GHSA-8p3x-w464-4g6v: 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 OSV·09:47 AM
Data Sourced
via OSV·09:47 AM
DescriptionWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Exposure requires both `[oauth2_client].ACCOUNT_LINKING` set to `auto` and registration enabled. Automatic account linking is not the default setting.

2

What does an attacker need to exploit this?

The attacker needs an account with a configured OAuth2 provider and another user's Gitea user name or email address. They do not need the target account's password.

3

What level of access could an attacker obtain?

An attacker could sign in as the targeted Gitea account, including an administrator account. The malicious external-identity link persisted for subsequent sign-ins.

4

What behavior prevents automatic linking after the fix?

Automatic linking only occurs when the existing account matches the OAuth2 provider's email address or provider-derived user name. If it does not match, the existing account password is required.

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