Technical impact
The vulnerability arises when the Gitea configuration option [oauth2_client].ACCOUNT_LINKING is set to auto and user registration is enabled. Instead of validating the identity asserted by the OAuth2 provider, the sign‑up form matches the submitted user name or email address against existing accounts. An attacker who possesses an account on the configured OAuth2 provider can submit the name or email of any other user, link their external identity to that account, and gain authentication without the account’s password—including administrative privileges. This is a classic authentication bypass and account compromise flaw classified as CWE-287 and CWE-639.
Affected Systems
All Gitea installations that enable automatic OAuth2 account linking (ACCOUNT_LINKING set to "auto") and have user registration turned on. Prior to the introduction of the fix in release 28.3.0, any version exposed to this configuration was vulnerable. Users running older versions with the auto‑linking setting should verify whether such a setting is present and address it accordingly.
Risk and Exploitability
The CVSS score of 9.8 indicates a critical risk. The exploit requires only an OAuth2 account and the ability to submit a crafted sign‑up form to the target Gitea instance. Once the external identity is linked, the victim’s account becomes fully authenticated, and the vulnerability persists for subsequent logins. With no known public exploits and an EPSS score of <1%, the practical exploitation risk depends on the attacker’s control over an OAuth2 provider account. The flaw is severe enough that it is listed in the vendor’s advisory and fixed in the latest release.