Traefik 3.7.20: Brotli DoS and leaked credentials
I run Traefik in front of most of what I self-host, so when two advisories landed on November 24 for the same release line, I read them before my coffee was finished. One is a denial of service anyone on the internet can trigger. The other is the kind of leak that only bites months later, when you paste a debug log into a forum thread.
The Brotli memory exhaustion
GHSA-3rh5-223h-cpwr is rated High. According to the advisory, the Compress middleware's Brotli writer holds several megabytes of state per response while that response is in flight, and the state grows with response size. Brotli is enabled by default and a client selects it simply by sending Accept-Encoding: br.
That means no authentication is needed. An attacker can keep many compressed responses open at once, for example over a single HTTP/2 connection, and exhaust Traefik's memory, which takes down every route rather than just the one being abused. The advisory describes it as the Brotli counterpart of GHSA-x5pf-cqh3-2gv8, which fixed the same class of problem for zstd earlier in November. The advisory lists no interim workaround beyond upgrading.
Credentials in debug logs and usage stats
GHSA-42x2-976f-ph52 is rated Moderate (CVSS v4 5.6, CWE-532, no CVE). Static configuration logged at DEBUG level was not redacted. The advisory names three leaking settings: the Docker and Swarm provider password, the Knative provider token, and the HTTP provider headers. The HTTP provider headers also show up in support dump archives and in the anonymous usage statistics.
The attack vector is local with high privileges required, so this is not a drive-by. It matters because logs travel: they get shipped to aggregators, attached to issues and handed to support. If you ever ran with --log.level=DEBUG and a Docker provider that used a password, that secret may be sitting somewhere you forgot about.
What I'm doing about it
- Upgrade. Both advisories list v3.0.0 through v3.7.19 and v3.8.0-rc.1 through rc.3 as affected, and v3.7.20 and v3.8.0 as patched. Traefik v2 is not affected.
- Check your line. The v3.0 to v3.6 lines are end of life and will not get a patch, so staying on 3.6 is not an option.
- Rotate, don't just upgrade. Upgrading stops future leaks but does not un-leak old logs. I'm treating any Docker provider password, Knative token or HTTP provider header that has appeared in a debug log as exposed.
The practical lesson is the same one I keep relearning with my reverse proxy: it sits on the edge, it parses hostile input all day, and it holds secrets for everything behind it. A floating tag helps with the first part and does nothing for the third, so I'm pinning to 3.7.20, rotating the credentials, and keeping debug logging off by default.