Traefik v3.7.0 Path Traversal via RewriteTarget Authentication Bypass
traefik
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/traefik/traefik/v3 Go |
|
|
| github.com/traefik/traefik Go |
| No fix yet |
| github.com/traefik/traefik/v2 Go |
|
traefik
| Product | Affected | Fixed in |
|---|---|---|
| github.com/traefik/traefik/v3 Go |
|
|
| github.com/traefik/traefik Go |
| No fix yet |
| github.com/traefik/traefik/v2 Go |
|
| No fix yet |
Traefik versions >= v3.7.0 and <= v3.7.7 contain a path traversal vulnerability in the Kubernetes Ingress NGINX provider's RewriteTarget middleware (generated from the nginx.ingress.kubernetes.io/rewrite-target annotation). When an Ingress path uses a regex that captures attacker-controlled text without requiring a path separator (e.g., path /api(.*) with rewrite target /$1), a crafted request such as /api../admin matches the public router, is rewritten to a dot-segment traversal path (/../admin), and is forwarded without post-replacement normalization validation. A backend that normalizes dot segments resolves the path to a protected endpoint (e.g., /admin) reachable only through a separate router secured with BasicAuth, DigestAuth, or ForwardAuth, resulting in route-level authentication bypass. The issue is fixed in v3.7.8.
From the CVE record · VulnCheck
Traefik’s Kubernetes Ingress NGINX provider RewriteTarget middleware can forward a crafted path traversal request without validating the rewritten path. An unauthenticated network attacker can bypass route-level authentication when an Ingress regex captures attacker-controlled text without requiring a path separator and the backend normalizes dot segments. No user interaction is required.
Check deployments using Go github.com/traefik/traefik/v3 versions 3.7.0 through 3.7.7; the listed github.com/traefik/traefik and github.com/traefik/traefik/v2 packages are affected in all versions and have no listed fix.