Summary
CVE-2026-20896 is a critical authentication bypass vulnerability (CVSS 9.8) in the official Gitea Docker image, affecting all versions up to and including 1.26.2. The flaw stems from a dangerous default configuration in the Docker image that allows any IP address on the internet to inject an arbitrary user identity via an HTTP header, resulting in complete unauthenticated access to the Gitea instance. Patches are available in Gitea 1.26.3 and 1.26.4.
Technical details
- Root cause: The Gitea Docker image ships with
REVERSE_PROXY_TRUSTED_PROXIES = *in its default configuration, causing Gitea to trust reverse-proxy authentication headers from any source IP address — rather than restricting trust to loopback or internal addresses as documented. - Trigger conditions: The vulnerability is exploitable when reverse-proxy authentication is enabled (
ENABLE_REVERSE_PROXY_AUTHENTICATION = true). The Docker image’s wildcard trusted-proxy setting is what enables unauthenticated exploitation from any network location. - Attack vector: A remote, unauthenticated attacker sends a single crafted HTTP request to the Gitea instance with the header
X-WEBAUTH-USER: <target_username>(e.g.,X-WEBAUTH-USER: admin). Because the wildcard configuration accepts any source IP as a trusted proxy, Gitea authenticates the request using the supplied header value without any credential verification. - Impact: Successful exploitation grants the attacker full access as the impersonated user. Targeting an administrator account results in complete platform compromise, including: read access to all private repositories, injection of SSH keys, extraction of CI/CD secrets, modification of webhooks (enabling potential lateral movement via SSRF), and — where auto-registration is enabled — creation of arbitrary accounts.
Affected software
- Gitea Docker image, all versions ≤ 1.26.2, when
ENABLE_REVERSE_PROXY_AUTHENTICATIONis set totrue
Severity
- CVSS v3.1 Base Score: 9.8 (Critical)
- Vector String:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate — upgrade: Update the Gitea Docker image to version 1.26.4 (recommended) or 1.26.3. The patched releases correct the Docker image’s default configuration so that only loopback connections are trusted as reverse-proxy sources.
- If immediate patching is not possible: Explicitly set
REVERSE_PROXY_TRUSTED_PROXIESto the specific IP address(es) of your upstream reverse proxy (e.g.,127.0.0.1or172.18.0.1) rather than the wildcard*. Additionally, ensureENABLE_REVERSE_PROXY_AUTHENTICATIONis disabled unless actively required. - Network mitigation: Restrict direct internet access to the Gitea HTTP port so that the
X-WEBAUTH-USERheader cannot be injected from untrusted sources.
IONIX Status
The IONIX research team is tracking ongoing exploitation attempts and recommends immediate patching. Potentially affected assets are outlined in this post.

