Skip to main content
← Vulnerabilities

Gitea OAuth2 account auto-linking takeover through the sign-up form

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

Published
Last modified
Published
Not listed in CISA KEV
0/100 · provisional
Unclear
Fix
Fixed in 28.3.0
None on Exploit-DB, Metasploit or GitHub

Summary

Gitea, the self-hosted Git service, is affected when its OAuth2 account auto-linking option is enabled alongside open registration. An attacker with an account on a configured OAuth2 provider could take over another user's Gitea account, including an administrator account, without knowing its password, and the takeover would persist for later sign-ins.

Read the original 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.

What to do

  • Upgrade to a fixed version: 28.3.0.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • gitea.dev

    fixed in 28.3.0

Evidence 5

  1. Advisory
  2. Patch
  3. Patch
  4. Repository
  5. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

FAQ

Questions about CVE-2026-120263

What should I do about it?

Upgrade Gitea to version 28.3.0 or later, which contains the patch. The advisory gives no workaround for this issue.Source: github.com

Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data