Skip to main content

Traefik CVE-2026-40912

| EUVDEUVD-2026-26428 HIGH
Use of Incorrectly-Resolved Name or Reference (CWE-706)
2026-04-24 https://github.com/traefik/traefik GHSA-6jwx-7vp4-9847
7.8
CVSS 4.0 · Vendor: https://github.com/traefik/traefik
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify Traefik with StripPrefixRegex + auth middleware
  2. Delivery
    Craft URL with %2e in prefix region
  3. Exploit
    Send request preserving encoded path
  4. Install
    StripPrefixRegex creates dot-segment path
  5. C2
    ForwardAuth bypasses on malformed path
  6. Execute
    Backend normalizes to protected path
  7. Impact
    Serve protected content

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Incorrectly specified target
Exploitation Conditions

Exploitation requires Traefik deployed with the StripPrefixRegex middleware configured in the same middleware chain as ForwardAuth, BasicAuth, or DigestAuth authentication middleware. The backend application must perform RFC 3986 dot-segment normalization, which is default behavior in Express.js (via express.static or built-in routing), Go's http.ServeMux, Spring Boot, nginx, Apache httpd, and most modern web frameworks-no special backend configuration required. The attacker must craft requests with percent-encoded dots (%2e or %2E) positioned within the prefix portion being stripped, and must use an HTTP client that preserves the encoded path (--path-as-is in curl, or custom clients). Limiting factors: The vulnerability does NOT affect Traefik deployments using the non-regex StripPrefix middleware, configurations without authentication middleware in the chain, or backends that reject dot-segment paths before normalization. Default Traefik installations without explicit StripPrefixRegex configuration are not vulnerable. Organizations can verify exposure by checking for routers.middlewares containing both stripPrefixRegex and any auth middleware in traefik.yml or dynamic configuration.

Impact

This vulnerability represents critical real-world risk despite lacking formal CVSS scoring. The attack vector is network-based with no authentication required, no user interaction needed, and low attack complexity-attackers simply insert %2e into the URL prefix. The working proof-of-concept demonstrates trivial exploitation: a single curl command with --path-as-is flag bypasses authentication completely. The technical impact is a complete authentication bypass affecting any protected resource behind the vulnerable middleware chain. Exploitation conditions are narrow but common: requires StripPrefixRegex combined with authentication middleware, and a backend that performs RFC 3986 normalization (which includes most modern frameworks by default). The vulnerability is NOT yet listed in CISA KEV, and no EPSS score is available for risk probability assessment. However, the public availability of a working PoC significantly elevates risk. SSVC decision factors favor prioritization: exploitation is proven (PoC-confirmed), technically impacts all CIA properties (complete auth bypass grants unauthorized access and potential data modification), and is automatable once configurations are identified. The primary risk limitation is deployment-specific: only affects Traefik instances using this specific middleware combination. Organizations not using StripPrefixRegex with authentication middleware are unaffected. The high severity designation by the vendor (Traefik maintainers) combined with PoC availability and wide applicability of affected backend frameworks justifies treating this as a high-priority remediation item for affected deployments.

Exploit ScenarioDerived

An unauthenticated remote attacker identifies a Traefik instance protecting an admin panel at /admin/secret using ForwardAuth with a StripPrefixRegex middleware configured to remove the /api prefix. The attacker crafts a request to http://target.com/api%2e/admin/secret using a tool like curl with the --path-as-is flag to prevent client-side normalization. Traefik's StripPrefixRegex matches the decoded path /api /admin/secret, strips the /api portion, but incorrectly slices the encoded RawPath, producing /./admin/secret. The ForwardAuth middleware receives X-Forwarded-Uri: /./admin/secret, which doesn't match the configured /admin/* protection rule, and allows the request through. The backend server (running Express.js, Go, or Spring Boot) automatically normalizes the dot-segment path /./admin/secret to /admin/secret per RFC 3986 and serves the protected admin panel content with a 200 response. The attacker gains full access to protected resources without providing any credentials. The attack requires only basic HTTP tools and succeeds against default configurations of common backend frameworks.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 24, 2026

Authentication bypass in Traefik's StripPrefixRegex middleware allows unauthenticated remote attackers to access protected resources when combined with ForwardAuth, BasicAuth, or DigestAuth. By inserting a percent-encoded dot (%2e) in the URL prefix, attackers exploit a length mismatch between decoded path matching and encoded path slicing, causing ForwardAuth to receive a dot-segment path (/./admin/secret) that bypasses protection rules while backend servers normalize it to the protected path (/admin/secret). Confirmed with working proof-of-concept against Traefik v3.6.11. Patches released for v2.11.43, v3.6.14, and v3.7.0-rc.2. No CVSS score assigned yet, but meets criteria for high severity given complete authentication bypass with network attack vector requiring no privileges or user interaction.

RemediationAI

Upgrade Traefik to a patched version immediately: v2.11.43 for the v2.x branch (https://github.com/traefik/traefik/releases/tag/v2.11.43), v3.6.14 for the v3.6.x branch (https://github.com/traefik/traefik/releases/tag/v3.6.14), or v3.7.0-rc.2 or later for v3.7.x (https://github.com/traefik/traefik/releases/tag/v3.7.0-rc.2). If immediate patching is not feasible, implement one of these compensating controls: (1) Remove StripPrefixRegex middleware from any router configuration that includes ForwardAuth, BasicAuth, or DigestAuth-this eliminates the vulnerable code path but requires reconfiguring backend applications to handle full paths including prefixes; (2) Replace StripPrefixRegex with the StripPrefix middleware (non-regex version) if exact prefix matching suffices for your use case, as it does not exhibit this vulnerability; (3) Implement additional path validation in the ForwardAuth service to reject requests containing dot-segments (/./ or /../) in the X-Forwarded-Uri header-this adds defense-in-depth but may cause false positives if legitimate traffic uses these patterns; (4) Deploy a Web Application Firewall rule to block requests containing percent-encoded dots (%2e, %2E) in URL paths-this prevents exploitation but may break legitimate applications that require encoded dots. Each workaround has operational trade-offs: options 1-2 require configuration changes and possible application modifications, option 3 adds processing overhead and complexity to auth services, and option 4 risks blocking valid traffic. The vendor-supplied patch is the only complete remediation without side effects.

Affected VersionsENISA

traefik 3.7.0-ea.1, < 3.7.0-rc.2
traefik 3.0.0-beta1, < 3.6.14
traefik < 2.11.43

Affected Packages

go github.com/traefik/traefik no fix
go github.com/traefik/traefik/v2 fix: 2.11.43
go github.com/traefik/traefik/v3 fix: 3.6.14, 3.7.0-rc.2
euvd traefik fix: 2.11.43
euvd traefik_3_0_0_beta1 fix: 3.6.14
euvd traefik_3_7_0_ea_1 fix: 3.7.0-rc.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 6 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in Traefik's StripPrefixRegex middleware implementation (pkg/middlewares/stripprefixregex/strip_prefix_regex.go, line 62), which performs regex matching against the URL-decoded Path but then uses the matched string's byte length to slice the percent-encoded RawPath. This creates a byte-length mismatch when percent-encoded characters exist in the prefix region. Specifically, when %2e (encoded dot) appears in the prefix, the decoded prefix is shorter than its encoded equivalent, causing incorrect slicing that produces a dot-segment path like /./admin/secret. The ForwardAuth middleware receives this malformed path via the X-Forwarded-Uri header, which doesn't match configured protection patterns (e.g., /admin/*). However, RFC 3986-compliant backend servers automatically normalize dot-segments during path resolution, converting /./admin/secret to /admin/secret and serving the protected content. The vulnerability is rooted in CWE-706 (Use of Incorrectly-Resolved Name or Reference), where the authentication layer and backend server resolve the same URL to different paths. This affects Traefik v2.x and v3.x branches when StripPrefixRegex is chained with any authentication middleware (ForwardAuth, BasicAuth, DigestAuth). The flaw is particularly dangerous because dot-segment normalization is standard behavior in Express.js, Go's http.ServeMux, Spring Boot, and most modern web frameworks, requiring no special backend configuration.

Know when Docker gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/traefik/traefik) PRIMARY 7.8 HIGH
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
SUSE 8.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Red Hat 8.6 HIGH

Primary rating from Vendor (https://github.com/traefik/traefik).

CVSS VectorVendor: https://github.com/traefik/traefik

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

4
Patch released
May 01, 2026 - 17:42 nvd
Patch available
Patch available
Apr 30, 2026 - 22:02 EUVD
CVSS changed
Apr 30, 2026 - 21:22 NVD
7.8 (HIGH)
CVE Published
Apr 24, 2026 - 16:37 nvd
HIGH 7.8

DescriptionCVE.org

Summary

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.

Patches

  • https://github.com/traefik/traefik/releases/tag/v2.11.43
  • https://github.com/traefik/traefik/releases/tag/v3.6.14
  • https://github.com/traefik/traefik/releases/tag/v3.7.0-rc.2

For more information

If there are any questions or comments about this advisory, please open an issue.

<details> <summary>Original Description</summary>

Summary

StripPrefixRegex uses the byte length of a decoded Path match to slice the encoded RawPath. When percent-encoded characters are in the prefix region, this produces a wrong RawPath. ForwardAuth then receives this wrong path in X-Forwarded-Uri, sees a path that doesn't match its protection rules, and approves the request. The backend serves protected content.

Details

pkg/middlewares/stripprefixregex/strip_prefix_regex.go, line 62:

go
  req.URL.RawPath = ensureLeadingSlash(req.URL.RawPath[len(prefix):])

prefix comes from matching the regex against the decoded req.URL.Path (line 51). len(prefix) is then used to index into the encoded req.URL.RawPath. These lengths don't match when percent-encoding is present.

Example with regex ^/api:

  • GET /api%20/admin/secret
  • Decoded Path: /api /admin/secret -> prefix = /api (4 bytes)
  • Encoded RawPath: /api%20/admin/secret -> same region is 6 bytes
  • RawPath[4:] = %20/admin/secret -> after ensureLeadingSlash -> /%20/admin/secret
  • ForwardAuth sees X-Forwarded-Uri: /%20/admin/secret -> not /admin/* -> allows it
  • Backend serves the protected admin content

PoC

Requires Docker and Docker Compose. I have a setup that runs Traefik v3.6.11 with StripPrefixRegex + ForwardAuth + a backend. It sends a normal request (blocked, 403) and an encoded request (bypasses auth, 200, returns protected data). Can share the files here if useful.

Impact

Auth bypass. Any path protected by ForwardAuth, BasicAuth, or DigestAuth can be accessed without credentials when StripPrefixRegex is in the same middleware chain. The attacker only needs to add a percent-encoded character to the prefix portion of the URL.

---

Updated PoC (reporter follow-up)

After further testing, the confirmed working exploit uses %2e (percent-encoded dot) rather than %20. Dot-segment normalization (/./ -> /) is RFC 3986 standard behavior handled automatically by Express.js, Go's http.ServeMux, Spring Boot, and others - no custom configuration needed.

Chain:

GET /api%2e/admin/secret
-> StripPrefixRegex strips /api -> RawPath becomes /./admin/secret
-> ForwardAuth sees /./admin/secret -> does not match /admin/ -> allows
-> Express normalizes /./admin/secret -> /admin/secret -> serves protected content

Results (Traefik v3.6, unmodified Express.js express.static):

GET /api/admin/secret      -> 403 (blocked)
GET /api%2e/admin/secret   -> 200 (bypass - served protected content)
GET /api%20/admin/secret   -> 404 (space not normalized by backend)

Auth server logs:

X-Forwarded-Uri: '/admin/secret'    -> DENIED
X-Forwarded-Uri: '/./admin/secret'  -> ALLOWED

Reproduction:

bash
docker compose up -d --build --wait
curl http://localhost:8080/api/admin/secret
# -> 403
curl --path-as-is "http://localhost:8080/api%2e/admin/secret"
# -> 200

</details>

---

Executive ViewAI

Why It Matters

Traefik's StripPrefixRegex middleware contains an authentication bypass vulnerability affecting versions prior to 2.11.43, 3.6.14, and 3.7.0-rc.2 that allows unauthenticated attackers to access protected resources by manipulating URL encoding. Organizations using Traefik with ForwardAuth, BasicAuth, or DigestAuth are at immediate risk of unauthorized access to sensitive backend services without requiring credentials or user interaction.

Business Impact: High
Compensating Controls

Pending vendor patch availability for affected versions. Immediate interim mitigation: disable or remove StripPrefixRegex middleware configurations that chain with authentication middleware; replace with alternative URL rewriting methods that do not have encoding vulnerabilities. Implement network-level access controls to restrict traffic to Traefik endpoints only from trusted networks. Enable detailed access logging to detect exploitation attempts using percent-encoded dot (%2e) patterns in URLs.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

59
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2025-14707 HIGH POC
8.9 Dec 15

Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

Vendor StatusVendor

SUSE

Severity: High

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy