CVE-2026-71326: Traefik: BasicAuth singleflight key collision allows authenticated identity spoofing
There is a low severity vulnerability in Traefik’s BasicAuth middleware. Concurrent password verifications are deduplicated through a singleflight group whose key was the delimiter-free concatenation of the submitted password and the stored secret, so a request carrying an unconfigured username — whose secret is empty — can produce the same key as a configured user’s valid request and receive that request’s successful result. Exploitation requires the attacker to already hold a valid credential and to read the stored password hash, which is only reachable through paths that are themselves privileged: the API is documented as admin-only, the Kubernetes path requires read access to the Secret, and the Docker path requires access to the socket. The key now encodes the password length as a prefix, so distinct (password, secret) pairs can no longer collide. Only the v3.6 line from v3.6.11 onwards and the v3.7 line are affected; earlier v3 releases and the v2 line do not carry the vulnerable deduplication path.
Traefik’s BasicAuth middleware deduplicates concurrent password checks with a
singleflight.Group. Its key is the delimiter-free concatenation
password + secret. For an existing user with password P and stored hash
H, the key is P || H. An unknown user can select the password P || H;
because its secret is the empty string, its key is also P || H.
If the existing user’s request starts the shared calculation, the unknown
user receives the existing user’s successful Boolean result. Traefik then
continues processing the unknown user’s original request and propagates the
attacker-selected username through URL.User, the access log, and the
configured BasicAuth headerField.
A user who knows one valid username/password/hash tuple can therefore
authenticate concurrently under any unconfigured username. This becomes a
privilege escalation when a backend uses the BasicAuth headerField as a
trusted identity, which is the documented purpose of that option.
References
- github.com/advisories/GHSA-6765-c87h-8mrf
- github.com/traefik/traefik/commit/b5ace8eb5d6779980567f5e75efd2d9e08b7e350
- github.com/traefik/traefik/pull/13572
- github.com/traefik/traefik/releases/tag/v3.6.25
- github.com/traefik/traefik/releases/tag/v3.7.10
- github.com/traefik/traefik/security/advisories/GHSA-6765-c87h-8mrf
- nvd.nist.gov/vuln/detail/CVE-2026-71326
Code Behaviors & Features
Detect and mitigate CVE-2026-71326 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →