CVE-2026-67309: Traefik: Kubernetes Ingress NGINX RewriteTarget Path Traversal Allows Route-Level Authentication Bypass
There is a high severity vulnerability in Traefik’s Kubernetes Ingress NGINX provider. When an Ingress uses the nginx.ingress.kubernetes.io/rewrite-target annotation with a regular expression that captures attacker-controlled text without requiring a path separator (for example path /api(.*) with rewrite target /$1), the generated RewriteTarget middleware can turn an initially safe request path into a dot-segment traversal path after the router has already been selected.
Traefik’s Kubernetes Ingress NGINX provider creates an internal RewriteTarget middleware for the nginx.ingress.kubernetes.io/rewrite-target annotation. When an Ingress path captures attacker-controlled text without requiring a path separator, the middleware can turn an initially safe path into a dot-segment traversal path after Traefik has already selected the router.
For example, with Ingress path /api(.*) and rewrite target /$1, an unauthenticated request to /api../admin follows this flow:
- The default entry-point path sanitizer leaves
/api../adminunchanged becauseapi..is one ordinary segment. - The public router’s
PathRegexp("(?i)^/api(.*)")rule matches. RewriteTargetcaptures../adminand creates/../admin.- The middleware forwards
/../adminwithout checking whether path normalization changes it. - A backend that normalizes paths resolves
/../adminto/admin. - The request reaches content intended to be reachable only through a separate
/adminrouter with BasicAuth, DigestAuth, or ForwardAuth.
This is an unpatched sibling of GHSA-cxjq-mrr5-89rv, which added post-replacement normalization validation to ReplacePathRegex. The separate ingress-nginx RewriteTarget implementation did not receive the same validation. The bypass remains exploitable in the patched Traefik v3.7.7 release.
References
- github.com/advisories/GHSA-8rxv-jg7p-wvg3
- github.com/traefik/traefik/commit/759515bec1b9f628b21ea8968ef63da853be5e29
- github.com/traefik/traefik/security/advisories/GHSA-8rxv-jg7p-wvg3
- nvd.nist.gov/vuln/detail/CVE-2026-67309
- www.vulncheck.com/advisories/traefik-path-traversal-via-rewritetarget-authentication-bypass
Code Behaviors & Features
Detect and mitigate CVE-2026-67309 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 →