CVE-2026-120263: Gitea OAuth2 account auto-linking takeover through the sign-up form

Published Nov 1, 2026
·
Updated

When [oauth2client].ACCOUNTLINKING 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.

Event History

Nov 1, 2026
CVE Published
via MITRE·09:47 AM
Data Sourced
via MITRE·09:47 AM
DescriptionWeakness
Data Sourced
via NVD·10:18 AM
DescriptionWeakness

Frequently Asked Questions

1

Are default Gitea deployments affected?

No. Exploitation requires [oauth2_client].ACCOUNT_LINKING to be explicitly set to auto, which is not the default, and registration to be enabled.

2

What does an attacker need to exploit this?

The attacker needs an account with a configured OAuth2 provider. They can submit another user's Gitea user name or email in the link-account sign-up form to attach their external identity to that account.

3

What is the impact after a successful exploit?

The attacker can sign in to the targeted Gitea account without its password, including an administrator account. The OAuth2 identity link persists for future sign-ins.

4

What can be done before applying the fix?

Do not use automatic account linking: change [oauth2_client].ACCOUNT_LINKING from auto, or disable registration if automatic linking cannot be changed immediately. These measures remove one or both conditions required for exploitation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203