Skip to content
Threat Feed
high advisory

GitHub Enterprise and Organization SSO Recovery Code Activity

GitHub SSO recovery codes act as break-glass credentials bypassing IdP-enforced MFA, and their unauthorized generation, access, or usage indicates potential credential access or persistence attempts.

Triage facts

Revision 1
Applicability
GitHub (Enterprise/Organization)
Evidence
Unknown
Severity
High
Action
Elevated
Sources
2 public sources
Freshness
Revision 1Nov 2, 15:09 UTC
Source quality
B2Roughly even chance

GitHub provides recovery codes for enterprise and organization SSO as a contingency for IdP access loss. Because these codes bypass external identity providers and MFA, they represent high-value targets for adversaries seeking to establish persistence or perform account takeover. Organizations should audit all actions related to these credentials, including generation, downloading, viewing, and usage, to identify anomalous administrative behavior.

Impact

Unauthorized access to recovery codes allows an attacker to bypass federated authentication and MFA, enabling persistent, unauthenticated access to the GitHub enterprise or organization environment.

Recommendation

  • Implement monitoring for GitHub audit logs specifically filtering for recovery code lifecycle events (download, generate, print, view, use, and failure).
  • Enforce dual-control procedures for the management of recovery codes, ensuring that any lifecycle event is tied to an authorized disaster recovery process.
  • Rotate recovery codes immediately if an unauthorized generation or viewing event is identified.
  • Review SSO configuration and force re-authentication of enterprise owners following any confirmed compromise of recovery credentials.

Threat Hunt

Identify anomalous GitHub recovery code lifecycle events in audit logs

T1552 high high confidence hunt now

Data: GitHub audit logs

Mitigations

Implement alerting on GitHub audit log actions: business.recovery_codes_*, org.recovery_codes_*

immediate Detection Engineering

Credential Access via SSO bypass