Traefik: BasicAuth Middleware Timing Attack Allows Username Enumeration
traefik
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/traefik/traefik Go |
| No fix yet |
| github.com/traefik/traefik/v2 Go |
|
|
| github.com/traefik/traefik/v3 Go |
traefik
| Product | Affected | Fixed in |
|---|---|---|
| github.com/traefik/traefik Go |
| No fix yet |
| github.com/traefik/traefik/v2 Go |
|
|
| github.com/traefik/traefik/v3 Go |
|
|
Traefik is an HTTP reverse proxy and load balancer. Versions 2.11.40 and below, 3.0.0-beta1 through 3.6.11, and 3.7.0-ea.1 comtain BasicAuth middleware that allows username enumeration via a timing attack. When a submitted username exists, the middleware performs a bcrypt password comparison taking ~166ms. When the username does not exist, the response returns immediately in ~0.6ms. This ~298x timing difference is observable over the network and allows an unauthenticated attacker to reliably distinguish valid from invalid usernames. This issue is patched in versions 2.11.41, 3.6.11 and 3.7.0-ea.2.
From the CVE record · GitHub_M
Traefik’s BasicAuth middleware responds more slowly for existing usernames than for nonexistent ones. An unauthenticated attacker can observe this difference over the network to identify valid usernames; no user interaction is required.
Check deployments using github.com/traefik/traefik at or below 1.7.34, github.com/traefik/traefik/v2 below 2.11.41, or github.com/traefik/traefik/v3 below 3.6.11 or from 3.7.0-ea.1 to before 3.7.0-ea.2.