Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Unrated

Authentication Bypass in Gitea Docker Reverse Proxy Authentication

IdentifiersCVE-2026-20896CWE-346

CVE-2026-20896 is a critical authentication bypass affecting official Gitea Docker images through version 1.26.2. Gitea supports reverse-proxy-based authentication using the X-WEBAUTH-USER header when requests originate from trusted proxies. The documented secure default for REVERSE_PROXY_TRUSTED_PROXIES is loopback-only (127.0.0.0/8,::1/128), but affected Docker images shipped with REVERSE_PROXY_TRUSTED_PROXIES = * in the default configuration template. In deployments where ENABLE_REVERSE_PROXY_AUTHENTICATION is enabled, this causes Gitea to trust authentication headers from any source IP rather than only from a legitimate upstream proxy. As a result, a remote attacker can send a crafted X-WEBAUTH-USER header directly to the Gitea instance and be authenticated as an arbitrary user, including an administrator. The issue is described as affecting Docker deployments; source-built Gitea instances using the standard sample configuration are reported as not affected.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows complete authentication bypass and user impersonation. An attacker can log in as any existing user, including administrators, and then perform actions available to that account. Reported consequences include administrator account takeover, modification of SSH keys, disabling of 2FA, export or access to private repositories, and redirection or modification of webhook URLs. Where administrative access is obtained, the vulnerability can lead to full compromise of the Gitea instance and its hosted source code, secrets, and integration settings.

Mitigation

If you can’t patch tonight, do this now.

If immediate upgrade is not possible, disable ENABLE_REVERSE_PROXY_AUTHENTICATION unless it is strictly required. Explicitly set REVERSE_PROXY_TRUSTED_PROXIES to only trusted proxy addresses instead of '*'. Ensure the Gitea service is not directly reachable from untrusted networks when reverse proxy authentication is in use, and enforce network controls so only the intended reverse proxy can connect to the application. If ENABLE_REVERSE_PROXY_AUTO_REGISTRATION is enabled, disable it unless operationally necessary. Review logs and account activity for suspicious header-based logins, unexpected account creation, SSH key changes, 2FA changes, repository exports, and webhook modifications.

Remediation

Patch, then assume compromise.

Upgrade affected Gitea Docker deployments to version 1.26.3 or later. The fix reportedly removes the wildcard trusted-proxy default from Docker images and makes reverse proxy authentication opt-in. After upgrading, verify that reverse proxy authentication is enabled only where required and that REVERSE_PROXY_TRUSTED_PROXIES is explicitly restricted to the actual IP addresses or CIDR ranges of the legitimate upstream reverse proxies.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity5

Community discussion across Reddit, Mastodon, and other social sources.