Quick answers
- Is CVE-2026-40912 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-40912 being exploited in the wild.
- How severe is CVE-2026-40912?
- High severity, with a CVSS score of 8.2, published 30 April 2026.
- Which products and versions are affected?
- github.com/traefik/traefik (Go) SEMVER:introduced=0, SEMVER:introduced=0,last_affected=1.7.34; github.com/traefik/traefik/v2 (Go) SEMVER:introduced=0,fixed=2.11.43; github.com/traefik/traefik/v3 (Go) SEMVER:introduced=3.0.0-beta1,fixed=3.6.14,introduced=3.7.0-ea.1,fixed=3.7.0-rc.2, SEMVER:introduced=3.7.0-ea.1,fixed=3.7.0-rc.2.
- Is there a fix for CVE-2026-40912?
- Yes. github.com/traefik/traefik/v2 (Go): upgrade to 2.11.43 or later; github.com/traefik/traefik/v3 (Go): upgrade to 3.7.0-rc.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-40912 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-40912?
- Check whether you run github.com/traefik/traefik (Go), github.com/traefik/traefik/v2 (Go), github.com/traefik/traefik/v3 (Go) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- github.com/traefik/traefik/v2 (Go): upgrade to 2.11.43 or later
go get github.com/traefik/traefik/v2@v2.11.43 - github.com/traefik/traefik/v3 (Go): upgrade to 3.7.0-rc.2 or later
go get github.com/traefik/traefik/v3@v3.7.0-rc.2
Technical details
An authentication bypass exists in Traefik's StripPrefixRegex middleware due to a Path/RawPath desynchronization. The middleware calculates the length of a prefix based on the decoded URL path but applies that length to slice the percent-encoded RawPath. When percent-encoded characters (like %2e for a dot) are present in the prefix, the resulting RawPath sent to authentication middlewares (ForwardAuth, BasicAuth, DigestAuth) is malformed (e.g., containing dot-segments like /./). These malformed paths may fail to match protected route patterns in the auth middleware, leading to an 'allow' decision. If the backend server subsequently normalizes the path per RFC 3986, it serves the protected content to the unauthenticated requester. Patches are available in versions 2.11.43, 3.6.14, and 3.7.0-rc.2.
Affected products
- traefik traefik/v2 < 2.11.43
- traefik traefik/v3 >= 3.0.0-beta1, < 3.6.14; >= 3.7.0-ea.1, < 3.7.0-rc.2
- traefik traefik <= 1.7.34
Identifiers
- CVE-2026-40912
- GHSA-6jwx-7vp4-9847
- GO-2026-5180
Timeline
- 2026-04-24: advisory
- 2026-04-24: disclosed
- 2026-04-24: patched