CVE-2026-40912·Traefik vulnerability
Traefik is an HTTP reverse proxy and load balancer. Prior to versions 2.11.43, 3.6.14, and 3.7.0-rc.2, there is a high severity authentication bypass vulnerability in Traefik's StripPrefixRegex middleware when used in combination with ForwardAuth, BasicAuth, or DigestAuth. The middleware matches the regex against the decoded URL path but uses the resulting byte length to slice the percent-encoded raw path. When a dot (or multiple dots) appears in the prefix portion of the URL, the raw path after stripping becomes a dot-segment (e.g. /./admin/secret). ForwardAuth receives this dot-segment path in X-Forwarded-Uri, which does not match the protected path patterns and therefore allows the request through. The backend then normalizes the dot-segment to the real path per RFC 3986 and serves the protected content An unauthenticated attacker can exploit this against any backend that performs dot-segment normalization. This issue has been patched in versions 2.11.43, 3.6.14, and 3.7.0-rc.2.
- Severity
- high
- Software
- Traefik
- Fixed in
- 3.6.14
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.77% — higher than 56% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-40912 scores 8.2 on CVSS, so a successful attack would be serious — but at 0.77%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 3.0.0
Until: 3.6.14
Fixed in: 3.6.14
How to fix this CVE
Upgrade Traefik to version 3.6.14 or later to patch the authentication bypass vulnerability in StripPrefixRegex middleware. This vulnerability allows unauthenticated attackers to bypass ForwardAuth, BasicAuth, and DigestAuth protections by exploiting dot-segment normalization in URL paths. Apply the update immediately, especially if you are using StripPrefixRegex in combination with any authentication middleware.
sudo dnf update traefikDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
GET|POST|PUT|DELETE.*\/(\w+\.)+/ HTTP|GET.*%2e%2e|GET.*%2e%2f|X-Forwarded-Uri:.*\/\./WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement a WAF rule to detect and block requests containing dot-segments (e.g., /./path or /../path) or excessively encoded slashes (%2e%2f, %2f%2e) in the URI before they reach Traefik. Additionally, enforce strict URL normalization on all incoming requests to prevent path traversal attempts.How to check if you are affected
- Step 1: Check the currently installed Traefik version by running `traefik version` or checking the binary with `./traefik version`
- Step 2: Review your Traefik configuration for use of StripPrefixRegex middleware combined with ForwardAuth, BasicAuth, or DigestAuth by searching configuration files for 'stripPrefixRegex' and 'forwardAuth|basicAuth|digestAuth'
- Step 3: Examine access logs and authentication middleware logs for requests containing dot-segments (e.g., patterns like '/./' or '/..') in the request path that successfully bypassed authentication checks
- Step 4: After upgrading to 3.6.14, verify the running version matches the patched release using `traefik version` and confirm middleware rules are still properly applied
FAQ
What is CVE-2026-40912?
CVE-2026-40912 is an authentication bypass vulnerability in Traefik's StripPrefixRegex middleware that allows unauthenticated attackers to access protected resources by exploiting inconsistent handling of URL encoding and path normalization between the middleware and backend servers.
Is CVE-2026-40912 being actively exploited?
No, CVE-2026-40912 is not currently listed on the CISA Known Exploited Vulnerabilities catalog, and no public exploits are available, though the vulnerability is relatively easy to exploit if the conditions are met.
What versions of Traefik are affected by CVE-2026-40912?
Traefik versions 3.0.0 through 3.6.13 are affected. Additionally, older 2.x versions prior to 2.11.43 are vulnerable. Versions 3.6.14, 2.11.43, and 3.7.0-rc.2 and later contain the fix.
How do I check if my server is vulnerable to CVE-2026-40912?
Run `traefik version` to get your installed version. If it is between 3.0.0 and 3.6.13 inclusive, and you are using StripPrefixRegex with any authentication middleware, your server is vulnerable.
Does Defensia detect CVE-2026-40912?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Traefik is installed on a monitored server, CVE-2026-40912 will appear in your dashboard with remediation steps.
Related Traefik CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-40912. Free for 1 server.
Get started free