CVE-2026-20896: Gitea's official Docker image trusted the reverse-proxy login header from any source, so where reverse-proxy authentication is enabled anyone can impersonate any user
Gitea Docker instances with reverse-proxy login enabled accepted a spoofed login header from anyone, and NCSC-CH rates it exploited
Defender actions
- Upgrade every Gitea Docker instance that runs with ENABLE_REVERSE_PROXY_AUTHENTICATION = true to 1.26.4, or until then set REVERSE_PROXY_TRUSTED_PROXIES to the authenticating proxy's exact address, internet-reachable instances first.
Analysis
Gitea 1.26.3 (2026-06-20) fixes a large set of security flaws and 1.26.4 (2026-06-21) adds one more, and Gitea recommends upgrading directly to 1.26.4 (Gitea, 2026-06-21). The critical flaw, CVE-2026-20896 (CVSS 9.8) (NCSC-CH Cyber Security Hub, 2026-07-10), is in the official Docker images, whose app.ini template hard-codes REVERSE_PROXY_TRUSTED_PROXIES = * instead of the documented loopback-only default (GitHub Security Advisory GHSA-f75j-4cw6-rmx4, 2026-06-21). When an administrator enables ENABLE_REVERSE_PROXY_AUTHENTICATION = true to put Gitea behind an authenticating reverse proxy, the image trusts the X-WEBAUTH-USER header from any source IP, so anyone who can reach the container's HTTP port directly can impersonate any user whose login name is known or guessable, with admin accounts the obvious targets (GitHub Security Advisory GHSA-f75j-4cw6-rmx4, 2026-06-21). Binary and self-built deployments that follow app.example.ini keep the loopback-only default and are not affected (GitHub Security Advisory GHSA-f75j-4cw6-rmx4, 2026-06-21). Version 1.26.3 removes the wildcard (The Hacker News, 2026-07-06) and makes reverse-proxy authentication opt-in and admin-configured (Gitea, 2026-06-21).
The same release fixes, among others, CVE-2026-27775, where the pre-receive hook cached the first ref's permission result and let a per-branch maintainer-edit grant escalate to full repository write (Gitea, 2026-06-21), CVE-2026-20779, a TOTP race and replay window across web login, password reset and the X-Gitea-OTP Basic-Auth surface (Gitea, 2026-06-21), and CVE-2026-22874, an incomplete SSRF protection in webhooks and migrations (Gitea, 2026-06-21). Germany's BSI issued WID-SEC-2026-2027 on 2026-06-22 rating the set "hoch" (BSI WID, 2026-06-22 · BSI WID CSAF, 2026-06-22). NCSC-CH set the exploitation status of CVE-2026-20896 to "Actively Exploited, Proof of Concept Available" on 2026-07-10 (NCSC-CH Cyber Security Hub, 2026-07-10), while the Sysdig telemetry behind the public reporting shows a first attempt that had not progressed beyond initial investigation (The Hacker News, 2026-07-06).
Triage: with reverse-proxy authentication on, a legitimate login also arrives as an X-WEBAUTH-USER header, set by the authenticating proxy, so the header alone is not the signal; the exploit is the same header on a direct connection from any other source, which signs the sender in with no password and no cookie (GitHub Security Advisory GHSA-f75j-4cw6-rmx4, 2026-06-21).
Cited evidence
can impersonate any user whose login name is known or guessable
An attacker can exploit multiple vulnerabilities in Gitea to gain elevated privileges, impersonate users, bypass security measures, manipulate data and disclose confidential information. (translated from German)
Current exploitation status: Actively Exploited, Proof of Concept Available
Successful exploitation allows unauthenticated attackers to gain full administrative control of Gitea instances via a single custom HTTP header.
So far, the activities have been related to initial investigation by the threat actor,
Updates3
NCSC-CH added CVE-2026-20896 to its Cyber Security Hub on 2026-07-10 with the exploitation status "Actively Exploited, Proof of Concept Available", and names as the prerequisite a deployment on the official Docker image with reverse-proxy authentication enabled (NCSC-CH Cyber Security Hub, 2026-07-10).
The public exploitation reporting traces to Sysdig, which detected a first exploitation attempt 13 days after disclosure. Sysdig's Michael Clark told The Hacker News that the activity had "not so far progressed to any exploitation or attack progress" (The Hacker News, 2026-07-06). The Hacker News puts the number of internet-facing Gitea instances at about 6,200 (The Hacker News, 2026-07-06).
Contradiction: SecurityWeek, reporting the same Sysdig telemetry, says threat actors are exploiting the flaw to access internet-accessible instances (SecurityWeek, 2026-07-07), while Sysdig's statement to The Hacker News is that the activity had not progressed to exploitation (The Hacker News, 2026-07-06).
The earlier main text said no exploitation was reported. NCSC-CH set the flaw to "Actively Exploited, Proof of Concept Available" on 2026-07-10 (NCSC-CH Cyber Security Hub, 2026-07-10), while Sysdig, whose telemetry the public reporting rests on, told The Hacker News that the activity had not progressed to exploitation (The Hacker News, 2026-07-06). SecurityWeek reports the same telemetry as exploitation (SecurityWeek, 2026-07-07). The earlier summary and main text also presented the takeover as open to anyone who reaches the port. It works only where an administrator has enabled reverse-proxy authentication on the official Docker image and left the trusted-proxies setting at the image default, and the attacker needs a known or guessable username (GitHub Security Advisory GHSA-f75j-4cw6-rmx4, 2026-06-21). The 1.26.3 release fixes more than four flaws, and CVE-2026-27775 is a cached permission check in the pre-receive hook, not a branch-protection race (Gitea, 2026-06-21). No cited source supports an earlier claim that Gitea dominates DACH and EU public-sector DevOps.
With reverse-proxy authentication on, legitimate logins also arrive as an X-WEBAUTH-USER header, which the authenticating proxy sets; the advisory's exploit is that header sent on a direct connection from any other source, which signs the sender in as the named user with no password and no cookie (GitHub Security Advisory GHSA-f75j-4cw6-rmx4, 2026-06-21).
Sources7
Revision history
- Published 2026-06-23-165387f6
- Update 2026-07-10T1228Z-intel
Switzerland's NCSC published an advisory on 2026-07-10 raising the exploitation status of the Gitea Docker-image reverse-proxy auth bypass (CVE-2026-20896, CVSS 9.8) to "Actively Exploited, Proof of Concept Available". The underlying flaw (the official Docker image trusting a spoofable X-WEBAUTH-USER header from any source IP for unauthenticated admin impersonation) was covered on 2026-06-23; the in-window delta is the national-CERT exploitation-status escalation. Public telemetry to date (Sysdig, via SecurityWeek/The Hacker News) still shows only reconnaissance-stage probing, so treat NCSC-CH's "actively exploited" label as a national-authority assessment and prioritise patching internet-reachable Docker instances now.
Changed: actions affected_products cves evidence regions sources tags techniques body
- Correction 2026-09-30T0639Z-audit
The main text still said no in-the-wild exploitation was reported after the 2026-07-10 update recorded NCSC-CH's actively-exploited status, and the summary and main text presented the takeover as open to anyone reaching the port. It requires reverse-proxy authentication to be enabled on the official Docker image with the trusted-proxies setting left at the image default, and a known or guessable username. The count of fixed flaws and the description of CVE-2026-27775 are corrected, an unsourced claim that Gitea dominates DACH and EU public-sector DevOps is removed, and hunting advice that relied on a log field no source documents is dropped.
Changed: headline summary actions body classification title tags sectors cves evidence sources
- Improvement 2026-10-21T0800Z-audit
The analysis gains a Triage line from the GitHub advisory: legitimate reverse-proxy logins also carry the X-WEBAUTH-USER header, set by the authenticating proxy, while the exploit sends it on a direct connection from any other source and signs in with no password and no cookie.
Changed: body
AI-generated · no human review · this permalink is the shareable record for the finding · verify operationally critical claims against the linked primary source.