← Back to search

CVE-2026-120263

9.8 CRITICALpublic exploit available

Published 2026-11-01 · Updated 2026-11-06

AI risk analysis

Summary
When OAuth2 account linking is set to 'auto', Gitea incorrectly links an attacker's external identity to a victim's existing account using only the submitted username or email instead of verifying the provider's asserted identity, allowing unauthorized account takeover without authentication.
Exploitability
Exploitation requires an attacker to possess a valid account on a configured OAuth2 provider and submit a victim's username or email during sign-up; no user interaction or special privileges are needed.
Blast radius
An attacker could gain full access to any target Gitea account—including administrative accounts—without knowing the password, persisting across future logins.
Detection
Look for multiple successful OAuth2 sign-ins from the same external identity (e.g., same provider user ID) to different Gitea accounts within a short time window, especially when those accounts share no email or username with the provider's asserted identity; also monitor for sign-ups where the submitted email/username does not match the provider's returned identity.
Prioritized remediation
Upgrade to Gitea version 1.22.3 or later, where automatic linking now requires the existing account to match the OAuth2 provider's email or derived username; until then, disable `[oauth2_client].ACCOUNT_LINKING` if not strictly required.
auth-bypassoauth2account-takeoverwebidentity-theft

Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.

NVD description

When `[oauth2_client].ACCOUNT_LINKING` is set to `auto` (not the default) and registration is enabled, the link-account sign-up form looked up the existing account to link by the user name or email submitted in the form instead of the identity asserted by the OAuth2 provider. An attacker with an account on a configured OAuth2 provider could submit another user's name, link their external identity to that Gitea account and be signed in as it without its password, including as an administrator. The link persisted for later sign-ins. Automatic linking now only happens when the existing account matches the provider's email or provider-derived user name; otherwise the account password is required.

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CWE-287, CWE-639

Public exploit & PoC references

All references

Source data: NVD (nvd.nist.gov), public domain. Exploit-DB.ai adds local AI analysis for defensive use only.

Related CVEs

Related by shared AI tags and CWE weakness class. Browse the full archive.