/

CVE-2026-73278

Severity:

CRITICAL RISK

(9.8)

Authentication Bypass (CWE-287) in Gitea OAuth2/OIDC

CVE-2026-73278

Analyzed

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Account Takeover and Authentication Factor Bypass

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Gitea's OAuth2 and OpenID Connect sign-in paths may omit the WebAuthn challenge when WebAuthn is the account's only configured second factor. An actor who can authenticate through an affected external identity flow could receive a full session without passkey verification, and one path may also preserve an external identity link for continued access.

Gitea's OAuth2 and OpenID Connect sign-in paths may omit the WebAuthn challenge when WebAuthn is the account's only configured second factor. An actor who can authenticate through an affected external identity flow could receive a full session without passkey verification, and one path may also preserve an external identity link for continued access.

Affected context

The issue occurs in Gitea deployments that:

  • Enable OAuth2 or OpenID Connect authentication
  • Allow accounts to use WebAuthn as their only configured second factor
  • Permit the affected external identity sign-in path to establish a full session

The reported WebAuthn-only scenario does not apply to accounts that also have TOTP configured. One affected flow may persist an external identity association after sign-in.

The issue occurs in Gitea deployments that:

  • Enable OAuth2 or OpenID Connect authentication
  • Allow accounts to use WebAuthn as their only configured second factor
  • Permit the affected external identity sign-in path to establish a full session

The reported WebAuthn-only scenario does not apply to accounts that also have TOTP configured. One affected flow may persist an external identity association after sign-in.

Exploit preconditions

  • Attack surface: Gitea OAuth2 and OpenID Connect sign-in endpoints
  • Required access: Ability to authenticate through an affected external identity provider flow
  • Account condition: The target account relies on WebAuthn as its only configured second factor
  • Trigger point: External identity authentication followed by session establishment
  • Why exploitation is possible: The external sign-in path does not consistently enforce the WebAuthn challenge required by the password-login path
  • Attack surface: Gitea OAuth2 and OpenID Connect sign-in endpoints
  • Required access: Ability to authenticate through an affected external identity provider flow
  • Account condition: The target account relies on WebAuthn as its only configured second factor
  • Trigger point: External identity authentication followed by session establishment
  • Why exploitation is possible: The external sign-in path does not consistently enforce the WebAuthn challenge required by the password-login path

Why this happens

The underlying flaw is inconsistent enforcement of authentication assurance across alternative sign-in paths. A session can be created after OAuth2 or OpenID Connect authentication without requiring the WebAuthn factor that protects the account during password-based login. This behavior maps to CWE-287: Improper Authentication, because a protected account may be treated as fully authenticated without verifying all required authentication factors.

The underlying flaw is inconsistent enforcement of authentication assurance across alternative sign-in paths. A session can be created after OAuth2 or OpenID Connect authentication without requiring the WebAuthn factor that protects the account during password-based login. This behavior maps to CWE-287: Improper Authentication, because a protected account may be treated as fully authenticated without verifying all required authentication factors.

Potential impact

  • An attacker may obtain an authenticated Gitea session without completing the required passkey challenge.
  • The attacker could access repositories, organization resources, or other functions available to the account.
  • An affected flow may allow an external identity link to persist, potentially extending access beyond the initial session.
  • Repository contents, credentials, or project integrity could be exposed or altered.
  • An attacker may obtain an authenticated Gitea session without completing the required passkey challenge.
  • The attacker could access repositories, organization resources, or other functions available to the account.
  • An affected flow may allow an external identity link to persist, potentially extending access beyond the initial session.
  • Repository contents, credentials, or project integrity could be exposed or altered.

General mitigation guidance

Mitigation generally focuses on applying consistent authentication assurance requirements to every login and account-linking path.

Common defensive patterns include:

  • Requiring the configured WebAuthn challenge before establishing a fully privileged session, regardless of the selected sign-in method.
  • Applying equivalent step-up authentication to OAuth2, OpenID Connect, password, recovery, and identity-linking workflows.
  • Treating external-provider authentication as insufficient to bypass locally configured factors unless an explicit, trusted assurance policy permits it.
  • Requiring fresh multifactor verification before creating or changing persistent external identity links.
  • Limiting session privileges until all account-specific authentication requirements are satisfied.
  • Monitoring and reviewing external identity associations and enforcing least privilege for authenticated accounts.

Mitigation generally focuses on applying consistent authentication assurance requirements to every login and account-linking path.

Common defensive patterns include:

  • Requiring the configured WebAuthn challenge before establishing a fully privileged session, regardless of the selected sign-in method.
  • Applying equivalent step-up authentication to OAuth2, OpenID Connect, password, recovery, and identity-linking workflows.
  • Treating external-provider authentication as insufficient to bypass locally configured factors unless an explicit, trusted assurance policy permits it.
  • Requiring fresh multifactor verification before creating or changing persistent external identity links.
  • Limiting session privileges until all account-specific authentication requirements are satisfied.
  • Monitoring and reviewing external identity associations and enforcing least privilege for authenticated accounts.

How teams detect issues like this

Organizations can assess for this class of issue through:

  • Static and behavioral tests that compare factor enforcement across password, OAuth2, OpenID Connect, recovery, and account-linking paths.
  • Code review checks for session creation or identity-link persistence that occurs before local MFA verification.
  • Integration tests covering accounts with WebAuthn as the sole second factor and confirming that every authentication route requires a challenge.
  • Policy checks that require consistent authentication assurance before granting full sessions or modifying identity bindings.
  • Audit-log monitoring for external sign-ins, unusual session creation, and unexpected identity-link changes.

Automated security review tools may help identify authentication branches that establish sessions without invoking the expected second-factor checks.

Organizations can assess for this class of issue through:

  • Static and behavioral tests that compare factor enforcement across password, OAuth2, OpenID Connect, recovery, and account-linking paths.
  • Code review checks for session creation or identity-link persistence that occurs before local MFA verification.
  • Integration tests covering accounts with WebAuthn as the sole second factor and confirming that every authentication route requires a challenge.
  • Policy checks that require consistent authentication assurance before granting full sessions or modifying identity bindings.
  • Audit-log monitoring for external sign-ins, unusual session creation, and unexpected identity-link changes.

Automated security review tools may help identify authentication branches that establish sessions without invoking the expected second-factor checks.

Sources

SourceLink
blog.gitea.comblog.gitea.com/release-of-1.27.2/
github.comgithub.com/go-gitea/gitea/pull/38805
github.comgithub.com/go-gitea/gitea/pull/38810
github.comgithub.com/go-gitea/gitea/releases/tag/v1.27.2
github.comgithub.com/go-gitea/gitea/security/advisories/GHSA-92j2-6qcg-c28c

Frequently asked

questions

It can be exploitable through network-accessible OAuth2 or OpenID Connect sign-in endpoints when the attacker can authenticate through the affected external identity flow and the target account is in the WebAuthn-only configuration.

No. The reported weakness is that the external sign-in path may grant a full session without requiring the WebAuthn challenge that password login would enforce. The attacker still must satisfy the external identity provider's authentication requirements.

Enforce the account's configured WebAuthn challenge consistently before granting a full session or allowing persistent external identity changes, regardless of which authentication path initiated the login.

Use centralized authentication-assurance checks, test every alternate login and account-linking flow, monitor identity associations, and require step-up verification whenever a session or account security state changes.

It can be exploitable through network-accessible OAuth2 or OpenID Connect sign-in endpoints when the attacker can authenticate through the affected external identity flow and the target account is in the WebAuthn-only configuration.

No. The reported weakness is that the external sign-in path may grant a full session without requiring the WebAuthn challenge that password login would enforce. The attacker still must satisfy the external identity provider's authentication requirements.

Enforce the account's configured WebAuthn challenge consistently before granting a full session or allowing persistent external identity changes, regardless of which authentication path initiated the login.

Use centralized authentication-assurance checks, test every alternate login and account-linking flow, monitor identity associations, and require step-up verification whenever a session or account security state changes.

Find out what's already
exploitable in your codebase.