External risk intelligence

Gitea Account Linking Vulnerability Allows Unauthorized Access.

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2026-120263

The vulnerability affects Gitea, a self-hosted Git service that is commonly deployed as an internet-facing web application for collaborative software development and code hosting. Because these services are frequently exposed to the public internet to facilitate remote access for developers and automated systems, the vulnerable account linking functionality is exposed in a typical internet-facing deployment.

Authentication Bypass

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A critical vulnerability has been identified in a common Git service, allowing unauthorized users to gain access to accounts, including administrator privileges, by exploiting a flaw in how external identities are linked during sign-up. This issue could potentially compromise sensitive code repositories and user data if the affected feature is enabled.

  • Attackers can hijack accounts via external sign-in.
  • Access to code and user data is at risk.
  • Confirm if automatic account linking is enabled.

Attack Path

How an attacker could exploit the issue

An attacker who has an account with a configured OAuth2 provider can exploit this vulnerability to gain unauthorized access to other users' Gitea accounts. By submitting another user's username or email during the account linking process, the attacker can associate their external identity with the victim's Gitea account. This allows the attacker to sign in as the victim, potentially gaining administrator privileges, without needing the victim's password. The compromised link remains active for subsequent sign-ins.

  • Attacker needs an OAuth2 account.
  • Submits attacker-controlled identity during linking.
  • Unauthorized access and account takeover.

Live Threat

Current exploitation, exposure, and threat context

When the `ACCOUNT_LINKING` setting is configured to `auto` and registration is enabled, an attacker could impersonate a legitimate user, including administrators, by linking their external identity to a Gitea account without needing the user's password. This allows the attacker to gain unauthorized access to the user's account, with the linked account persisting for future sign-ins.

  • User accounts and administrator access.
  • Linking external identity to a Gitea account.
  • Unauthorized access to account data and actions.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability impacts self-hosted Git services, likely requiring action from platform or application owners. The first step is to inventory where the affected technology is deployed, assess its internet reachability and criticality, and identify the specific accountable owner before planning remediation.

  • Platform or application owners should lead.
  • Verify external access and business criticality.
  • Plan remediation considering vendor coordination.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is Gitea and what is it used for?

Gitea is a lightweight, self-hosted software development platform. It provides a web interface for hosting Git repositories, managing code, tracking issues, and coordinating team collaboration. Organizations frequently deploy it on their own infrastructure to maintain private, controlled access to their project source code and development workflows.

How does CWE-287 and CWE-639 describe this vulnerability?

These codes refer to Improper Authentication and Authorization Bypass Through User-Controlled Keys. In CVE-2026-120263, the system incorrectly trusts the username or email provided in a sign-up form rather than validating the identity returned by the OAuth2 provider. This flaw allows an attacker to bypass standard identity verification, essentially tricking the system into linking their external account to someone else's existing Gitea profile.

What preconditions are required to trigger this flaw?

The vulnerability only exists if you have manually changed the [oauth2_client].ACCOUNT_LINKING configuration setting to 'auto' and simultaneously enabled user registration. If you use the default settings where account linking is not automatic, or if registration is disabled, the specific logic path that allows this unauthorized linking is not active.

How do I know if my Gitea instance is at risk?

According to Halo Surface Signal, this vulnerability is particularly relevant if your Gitea instance is exposed to the public internet. Because Gitea is commonly used for remote team collaboration, many instances are intentionally made internet-facing. If your instance is reachable from the outside and uses the 'auto' account linking configuration, your accounts are potentially exposed to unauthorized takeover.

What should I do first to address this security concern?

Begin by reviewing your Gitea configuration file to determine if [oauth2_client].ACCOUNT_LINKING is set to 'auto'. If it is, verify whether registration is enabled. If both conditions are met, prioritize restricting access or reverting the linking configuration to a safer state. Consult the official Gitea release documentation for v28.3.0 to identify the recommended patch or security update to apply.

References