Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for CVE-2026-20896.

Upgrade to Pro
CVE-2026-20896

Gitea Docker REVERSE_PROXY_TRUSTED_PROXIES Wildcard Allows X-WEBAUTH-USER Auth Bypass (CVE-2026-20896)

The official Gitea Docker image ships with REVERSE_PROXY_TRUSTED_PROXIES set to * by default. Because Gitea's reverse-proxy authentication feature trusts the X-WEBAUTH-USER header from any source claiming to be a trusted proxy, an unauthenticated attacker with direct network access to the Gitea HTTP listener (bypassing any intended reverse proxy) can set this header to impersonate any username, including admin accounts, and obtain a fully authenticated session without credentials. Affects code.gitea.io/gitea < 1.26.3. This detection identifies HTTP requests to Gitea that carry X-WEBAUTH-USER (or similar reverse-proxy auth headers) originating from IP addresses outside the expected reverse-proxy/load-balancer CIDR, as well as anomalous successful authentications tied to reverse-proxy auth with no corresponding upstream proxy log entry.

Vulnerability Intelligence

Public PoC

What is CVE-2026-20896 Gitea Docker REVERSE_PROXY_TRUSTED_PROXIES Wildcard Allows X-WEBAUTH-USER Auth Bypass (CVE-2026-20896)?

Gitea Docker REVERSE_PROXY_TRUSTED_PROXIES Wildcard Allows X-WEBAUTH-USER Auth Bypass (CVE-2026-20896) (CVE-2026-20896) maps to the Initial Access and Privilege Escalation and Defense Evasion tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for Gitea Docker REVERSE_PROXY_TRUSTED_PROXIES Wildcard Allows X-WEBAUTH-USER Auth Bypass (CVE-2026-20896), covering the data sources and telemetry it touches: Web server / reverse proxy logs ingested via AMA, Gitea application logs forwarded to Log Analytics. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Privilege Escalation Defense Evasion
Microsoft Sentinel / Defender
kusto
let TrustedProxyCIDRs = dynamic(["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"]);
W3CIISLog
| where cs_uri_stem has "/user/login" or csUriQuery has "X-WEBAUTH-USER" or cs(X-WEBAUTH-USER) != ""
| extend WebAuthUser = cs(X-WEBAUTH-USER)
| where isnotempty(WebAuthUser)
| where not(ipv4_is_match(c_ip, "10.0.0.0/8") or ipv4_is_match(c_ip, "172.16.0.0/12") or ipv4_is_match(c_ip, "192.168.0.0/16"))
| project TimeGenerated, c_ip, WebAuthUser, cs_uri_stem, cs_User_Agent
| order by TimeGenerated desc

Detects requests to Gitea containing the X-WEBAUTH-USER reverse-proxy auth header originating from source IPs outside the trusted internal proxy CIDR ranges, indicating direct-to-application header injection auth bypass.

critical severity medium confidence

Data Sources

Web server / reverse proxy logs ingested via AMA Gitea application logs forwarded to Log Analytics

Required Tables

W3CIISLog

False Positives

  • Legitimate reverse proxy rotated to a new untracked IP not yet added to the trusted CIDR list
  • Internal load balancer health checks that pass through unexpected source IP due to NAT
  • Misconfigured monitoring tool forwarding synthetic X-WEBAUTH-USER test headers

Sigma rule & cross-platform mapping

The detection logic for Gitea Docker REVERSE_PROXY_TRUSTED_PROXIES Wildcard Allows X-WEBAUTH-USER Auth Bypass (CVE-2026-20896) (CVE-2026-20896) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: network_connection
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Direct X-WEBAUTH-USER header injection against Gitea container

    Expected signal: HTTP request log entry on the Gitea/reverse-proxy access log showing X-WEBAUTH-USER header with source IP of the test host

  2. Test 2Verify REVERSE_PROXY_TRUSTED_PROXIES wildcard misconfiguration

    Expected signal: Command execution logged in container audit/history; no network telemetry generated

  3. Test 3Impersonate arbitrary user and attempt privileged API call

    Expected signal: Gitea audit log entry for an admin API call sourced from an impersonated session; access log entry with X-WEBAUTH-USER header from untrusted source IP

Unlock playbooks & atomic tests with Pro

Get the full detection package for CVE-2026-20896 — response playbook and atomic red team tests, plus investigation guidance and hunting queries.

df00tech Pro — £29/user/month

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections