# CVE-2026-40912: Traefik: StripPrefixRegex auth bypass via Path/RawPath desync

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: None; Availability impact: None; Confidentiality impact on other systems: High; Integrity impact on other systems: Low; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.72% (percentile 50, 2026-11-26)
- **CWE:** CWE-706
- **Aliases:** GHSA-6jwx-7vp4-9847, GO-2026-5180
- **Published:** 2026-04-24T16:37:53.000Z
- **Modified:** 2026-11-23T20:30:09.061Z

## Who should check

- Projects that depend on Go package github.com/traefik/traefik/v3 (\>= 3.7.0-ea.1, \< 3.7.0-rc.2)
- Projects that depend on Go package github.com/traefik/traefik/v2 (\< 2.11.43)
- Projects that depend on Go package github.com/traefik/traefik (\<= 1.7.34)
- Anyone running traefik \< 2.11.43; \>= 3.0.0-beta1, \< 3.6.14; \>= 3.7.0-ea.1, \< 3.7.0-rc.2

## Description

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.

## Affected and fixed versions

- Go `github.com/traefik/traefik/v3`: affected \>= 3.7.0-ea.1, \< 3.7.0-rc.2; fixed 3.7.0-rc.2, 3.6.14 (osv)
- Go `github.com/traefik/traefik/v2`: affected \< 2.11.43; fixed 2.11.43 (osv)
- Go `github.com/traefik/traefik`: affected \<= 1.7.34; fixed no fix listed yet (osv)
- traefik: \< 2.11.43; \>= 3.0.0-beta1, \< 3.6.14; \>= 3.7.0-ea.1, \< 3.7.0-rc.2 (cvelist)

## Mitigation

- Upgrade github.com/traefik/traefik/v3 to one of 3.7.0-rc.2, 3.6.14 (or later in the same release line).
- Upgrade github.com/traefik/traefik/v2 to 2.11.43 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-40912. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-40912.md
Affected: github.com/traefik/traefik/v3 >= 3.7.0-ea.1, < 3.7.0-rc.2; github.com/traefik/traefik/v2 < 2.11.43; github.com/traefik/traefik <= 1.7.34
Fixed in: 3.7.0-rc.2, 3.6.14, 2.11.43

Steps:
1. Search this machine and project for github.com/traefik/traefik/v3 (Go), github.com/traefik/traefik/v2 (Go), github.com/traefik/traefik (Go), traefik: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-40912 being exploited?

There is no confirmed exploitation: CVE-2026-40912 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.72% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-40912?

High: CVSS 7.8 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-40912?

github.com/traefik/traefik/v3 \>= 3.7.0-ea.1, \< 3.7.0-rc.2; github.com/traefik/traefik/v2 \< 2.11.43; github.com/traefik/traefik \<= 1.7.34.

### Is there a fix for CVE-2026-40912?

Yes. Fixed in 3.7.0-rc.2, 3.6.14, 2.11.43. Upgrade github.com/traefik/traefik/v3 to one of 3.7.0-rc.2, 3.6.14 (or later in the same release line). Upgrade github.com/traefik/traefik/v2 to 2.11.43 or later.

### How do I check if I'm affected by CVE-2026-40912?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/traefik/traefik/security/advisories/GHSA-6jwx-7vp4-9847>
- vendor: <https://access.redhat.com/errata/RHSA-2026:21772>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-40912>
- other: <https://github.com/traefik/traefik/releases/tag/v2.11.43>
- other: <https://github.com/traefik/traefik/releases/tag/v3.6.14>
- other: <https://github.com/traefik/traefik/releases/tag/v3.7.0-rc.2>
- other: <https://access.redhat.com/security/cve/CVE-2026-40912>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2464229>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40912.json>
- other: <https://github.com/traefik/traefik>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-40912>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-6jwx-7vp4-9847> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2026-5180> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-40912> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-40912>
