CVE-2026-20896: Gitea Docker images trust X-WEBAUTH-USER from any IP (user impersonation)

Critical 9.8 EPSS 2.8%

The official Gitea Docker images (root and rootless) shipped an app.ini template with REVERSE_PROXY_TRUSTED_PROXIES = *, instead of the documented loopback-only default. When an admin enables reverse-proxy authentication (ENABLE_REVERSE_PROXY_AUTHENTICATION = true), anyone who can reach the container's HTTP port directly can log in as any user, including admins, by sending an X-WEBAUTH-USER header; with auto-registration enabled they can also create accounts. Binary and self-built installs that follow app.example.ini are not affected. Rated CVSS 9.8.

What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms

What to do now

  1. Check whether you run the affected software and which version (commands below).
  2. Install the fixed version for your system: see “Patch it” below.
  3. Recreate the Gitea container; restart it again after editing app.ini.
  4. If you cannot patch today, apply the temporary mitigation below and patch as soon as possible.

Affected and fixed versions

Affected:

Fixed in:

Am I affected?

docker exec gitea gitea --version
docker exec gitea grep -n 'REVERSE_PROXY_TRUSTED_PROXIES\|ENABLE_REVERSE_PROXY_AUTHENTICATION' /data/gitea/conf/app.ini
docker inspect gitea --format '{{range .Config.Env}}{{println .}}{{end}}' | grep -i REVERSE_PROXY

Patch it

Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.

Docker images
docker pull docker.gitea.com/gitea:1.26.4   # or any later release, e.g. 1.27.2
# in docker-compose.yml set: image: docker.gitea.com/gitea:1.26.4 (rootless: 1.26.4-rootless)
docker compose up -d
# existing app.ini files are not rewritten by an image upgrade: check [security] REVERSE_PROXY_TRUSTED_PROXIES and set it to your proxy's address

General update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.

If you cannot patch yet

Related vulnerabilities

Sources

Page generated automatically from official sources on 2026-11-03 18:05 UTC and reviewed by an editor. Always confirm with your vendor's advisory.