Traefik StripPrefix Route-Level Auth Bypass via Path Normalization
traefik
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/traefik/traefik/v2 Go |
|
|
| github.com/traefik/traefik/v3 Go |
|
|
traefik
| Product | Affected | Fixed in |
|---|---|---|
| github.com/traefik/traefik/v2 Go |
|
|
| github.com/traefik/traefik/v3 Go |
|
|
| github.com/traefik/traefik Go |
| No fix yet |
Traefik is an HTTP reverse proxy and load balancer. Prior to 2.11.48, 3.6.19, and 3.7.3, there is a high severity vulnerability in Traefik's StripPrefix middleware that allows an unauthenticated attacker to bypass route-level authentication and authorization. When a public router matches on a PathPrefix rule and applies the StripPrefix middleware, a request path containing .. or its percent-encoded form %2e%2e can match the public route at routing time and then, after the prefix is stripped and the path is normalized, resolve to a path served by a separate, authenticated router. As a result, an attacker can reach protected backend paths — such as admin or internal configuration endpoints — without satisfying the authentication middleware attached to the protected router. This vulnerability is fixed in 2.11.48, 3.6.19, and 3.7.3.
From the CVE record · GitHub_M
Traefik's StripPrefix middleware can let an unauthenticated network attacker bypass route-level authentication and reach protected backend paths. This occurs when a public router uses a PathPrefix rule and StripPrefix middleware, and a request path containing .. or %2e%2e resolves to a path served by a separate authenticated router.
Engineers running Traefik before 2.11.48, version 3 before 3.6.19 or from 3.7.0-ea.1 through versions before 3.7.3, or any version of the Go package github.com/traefik/traefik should check their deployments.