CVE-2026-20896
Gitea Docker image trusts spoofable reverse-proxy headers by default
Description
Gitea Docker image versions up to and including 1.26.2 use REVERSE_PROXY_TRUSTED_PROXIES=* by default, allowing any source IP to impersonate a user when reverse-proxy authentication headers such as X-WEBAUTH-USER are enabled.
In plain language
AI Act nowIf you run Gitea in Docker behind a reverse proxy with reverse-proxy login headers enabled, a remote attacker can impersonate users by spoofing those headers—this is a serious, actively probed risk.
CVE-2026-20896 is a header-trust issue in the Gitea Docker image: it defaults to trusting spoofable reverse-proxy headers (via REVERSE_PROXY_TRUSTED_PROXIES=*), enabling unauthenticated attackers to impersonate users when reverse-proxy authentication headers (e.g., X-WEBAUTH-USER) are enabled.
What to do now
- Check whether your Gitea Docker setup has reverse-proxy authentication enabled (for example, it relies on headers like X-WEBAUTH-USER) and whether the container trusts all proxy IPs (REVERSE_PROXY_TRUSTED_PROXIES=*).
- If both are enabled, immediately change the configuration so Gitea trusts ONLY your actual reverse proxy’s IP(s) or hostname—not “all IP addresses.”
- Upgrade the Gitea Docker image to a release that includes the fix referenced in go-gitea/gitea pull/38151 (use the exact fixed tag/version shown on the Gitea vendor release page).
- If you can’t upgrade right away, temporarily disable the reverse-proxy login headers (or ensure those headers are stripped at the reverse proxy) until you apply the fix.
CVSS Vector Breakdown
AV:NAttack VectorAC:LAttack ComplexityPR:NPrivileges RequiredUI:NUser InteractionS:UScopeC:HConfidentialityI:HIntegrityA:HAvailabilityWeaknesses
Affected Products
Exploitability
References
- Hackers exploit critical auth bypass in Gitea Docker imageen-us·BleepingComputer· Exploited Gitea Docker image web-app
- Critical Gitea Flaw Under Active Exploitation, Researchers Warnen-us·SecurityWeek· Exploited Gitea web-app
- Threat Actors Probe Gitea Docker Flaw CVE-2026-20896 13 Days After Disclosureen·The Hacker News· Exploited Gitea Docker Images web-app
- ⚡ Weekly Recap: Proxy Botnets, Browser Ransomware, AI Agent Tricks, Fake PoC Malware and Moreen·The Hacker News· Roundup malware
- Critical Gitea Security Flaws Expose Servers to Takeoveren-us·Daily CyberSecurity (securityonline.info)· PoC Gitea auth-bypass
Unlock Complete Vulnerability Intelligence
Get the full picture for CVE-2026-20896 and every CVE in our database. Create a free account — no credit card required.
Create Free Account