How the attack works
GitHub organizations and enterprises can require two-factor authentication (2FA) for every member, outside collaborator and billing manager. While the requirement is on, members without 2FA keep their membership but cannot reach the organization's resources, and outside collaborators without 2FA are removed. Owners can also allow only secure 2FA methods, which blocks accounts that still use SMS.
An attacker who controls an owner account can switch the requirement off, or remove a method restriction, in one settings change. Members who were blocked for lacking 2FA regain access at once, accounts whose passwords were phished or reused become usable with the password alone, and attacker-controlled accounts without 2FA can be invited. The change is recorded as a single organization or enterprise audit log event.
What an attacker needs
- Control of an organization owner or enterprise owner account, or of a token with admin rights over the organization.
Impact
Removes the second factor as an organization-wide control: any member whose password is known to the attacker becomes a working foothold into private repositories, Actions secrets and CI/CD. It weakens every later attempt to contain the intrusion, because recovered accounts can be reused with the password alone.
Detection rules
GitHub Two-Factor Method Restriction Removed
Detects an organization or enterprise owner removing or clearing a restriction on two-factor authentication methods, which lets accounts that rely on weaker methods such as SMS reach organization resources again.
title: GitHub Two-Factor Method Restriction Removed
id: 9b88fe5d-667a-4d4a-8b37-024d7ddf1b85
status: experimental
description: >-
Detects an organization or enterprise owner removing or clearing a
restriction on two-factor authentication methods, which lets accounts that
rely on weaker methods such as SMS reach organization resources again.
references:
- https://attack.mitre.org/techniques/T1556/006/
- https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/audit-log-events-for-your-organization
- https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
author: Forestall
date: 2026-11-10
tags:
- attack.defense-impairment
- attack.persistence
- attack.credential-access
- attack.t1556.006
logsource:
product: github
service: audit
detection:
selection:
action:
- org.remove_disallowed_two_factor_method
- org.clear_disallowed_two_factor_methods
- business.remove_disallowed_two_factor_method
- business.clear_disallowed_two_factor_methods
condition: selection
falsepositives:
- Owners relaxing the secure-methods policy after members could not sign in; confirm the change and its planned end date with the acting owner.
level: medium
False positives
- Owners relaxing the secure-methods policy after members could not sign in; confirm the change and its planned end date with the acting owner.
GitHub Two-Factor Authentication Requirement Disabled
Detects an organization or enterprise owner disabling the requirement for members to use two-factor authentication. Members blocked for lacking 2FA regain access immediately, and password-only accounts can be invited again.
title: GitHub Two-Factor Authentication Requirement Disabled
id: db5a01cf-2745-45ac-b004-b5b1b2e35963
status: experimental
description: >-
Detects an organization or enterprise owner disabling the requirement for
members to use two-factor authentication. Members blocked for lacking 2FA
regain access immediately, and password-only accounts can be invited again.
references:
- https://attack.mitre.org/techniques/T1556/006/
- https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/audit-log-events-for-your-organization
- https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
author: Forestall
date: 2026-11-10
tags:
- attack.defense-impairment
- attack.persistence
- attack.credential-access
- attack.t1556.006
logsource:
product: github
service: audit
detection:
selection:
action:
- org.disable_two_factor_requirement
- business.disable_two_factor_requirement
condition: selection
falsepositives:
- Rare. A short, announced change window (for example while onboarding a bot account) should still be confirmed with the acting owner.
level: high
False positives
- Rare. A short, announced change window (for example while onboarding a bot account) should still be confirmed with the acting owner.
Triage
- Identify the owner who made the change (actor) and confirm it with them through a separate channel.
- Check whether new members, outside collaborators or owners were added around the same time, and whether any of them lack 2FA.
- If unexplained, re-enable the requirement, reset the acting owner's credentials and sessions, and review audit log activity by accounts that regained access.
Response
Once the attack is confirmed:
- Turn the two-factor requirement back on, and restore the restriction to secure methods if it was removed. Expect the side effects. Outside collaborators without 2FA are removed, and members without it lose access to the organization's resources until they enable it.
- Secure the owner account that made the change. Reset its password and second factor, end its sessions and revoke its tokens and SSH keys.
- List the accounts that could reach the organization without a second factor while the requirement was off. These are members who had been blocked for lacking 2FA, and members, outside collaborators and owners added in that period. Remove the ones nobody can vouch for.
- Have members who accessed the organization without 2FA in that period change their password and enable 2FA, and review what their accounts accessed.
- Check for credentials that outlast the fix, such as personal access tokens approved, SSH keys and deploy keys added and apps installed while the requirement was off.
Mitigation
- Enforce the two-factor requirement as an enterprise policy so organization owners cannot turn it off, and allow only secure methods (passkeys, security keys, authenticator apps, GitHub Mobile). With Enterprise Managed Users, enforce MFA in the identity provider instead.
- Keep the number of organization and enterprise owners small, and require phishing-resistant 2FA for them.
- Stream the audit log to your SIEM and alert on any change to the 2FA requirement or to allowed 2FA methods.
Frequently asked questions
What happens to members without 2FA when the requirement is turned back on?
Members without two-factor authentication keep their membership but cannot reach the organization's resources until they enable it. Outside collaborators without it are removed from the organization. Plan for this when you restore the requirement after an incident, and review who was added while it was off.
Can an organization owner disable the requirement if the enterprise enforces it?
No. When the two-factor requirement is enforced as an enterprise policy, organization owners cannot turn it off. The change then needs an enterprise owner, which the rule covers through `business.disable_two_factor_requirement`. With Enterprise Managed Users, multi-factor authentication is enforced in the identity provider instead.
Why does lifting a ban on weak 2FA methods matter if 2FA is still required?
Owners can allow only secure methods, which blocks accounts that still use SMS. Removing or clearing that restriction lets those accounts reach organization resources again with a weaker second factor. The requirement itself stays on, so the change is easy to overlook, which is why it has a rule of its own on this page.
Is there a routine reason to switch the requirement off?
Rarely. A short, announced change window, for example while a bot account is onboarded, is the usual explanation, and it should still be confirmed with the acting owner through a separate channel. Treat any other case as a possible owner account takeover, because one settings change makes every account with a known password usable again.