CVE-2026-137481 — Traefik — CWE-22
Traefik before 2.11.62, 3.x before 3.7.18, and 3.8.0-rc.1 contain an authorization bypass because the sanitizePath entry point option leaves dot-segments carrying path parameters, such as /..;x/, unresolved when matching routers and applying middlewares. Unauthenticated attackers can send requests like /public/..;x/admin to a parameter-stripping backend shared with a protected router, bypassing authentication or authorization middlewares to reach protected resources.
Traefik before 2.11.62, 3.x before 3.7.18, and 3.8.0-rc.1 contain an authorization bypass because the sanitizePath entry point option leaves dot-segments carrying path parameters, such as /..;x/, unresolved when matching routers and applying middlewares. Unauthenticated attackers can send requests like /public/..;x/admin to a parameter-stripping backend shared with a protected router, bypassing authentication or authorization middlewares to reach protected resources.
🎯 What is this vulnerability?
CVE‑2026‑137481 – Traefik path‑parameter sanitisation bypass
| Attribute | Value |
|---|---|
| Vendor / Project | Traefik (reverse‑proxy / edge router) |
| Affected releases | traefik:traefik 2.11.62‑ (all 2.11.x < 2.11.62) <br> traefik:traefik 3.x < 3.7.18 <br> traefik:traefik 3.8.0‑rc.1 |
| CWE | CWE‑22 Improper Limitation of a Pathname to a Restricted Directory (‘Path Traversal’) |
| CVSS 4.0 vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N |
| Score | 9.3 (HIGH) |
Technical root cause
Traefik normalises incoming request paths through the sanitizePath entry‑point option. The normalisation algorithm removes “dot‑segments” (/./, /../) unless they are followed by a path‑parameter (the ; segment defined by RFC 3986).
Example of a dot‑segment with a path‑parameter:
/..;x/When such a segment is present, the sanitiser leaves it untouched. The router‑matching engine and the middleware chain (e.g. Auth, IPWhitelist, BasicAuth) operate on the raw request URI after the sanitiser runs. Consequently:
1. The router lookup treats /public/..;x/admin as a distinct path that does not contain a ../ traversal – the .. is considered part of a path‑parameter, not a directory‑up‑reference.
2. If a public router (no auth middleware) is configured for the prefix /public/, the request is routed to the same backend that also serves a protected router (e.g. /admin/) because the backend is shared (common “parameter‑stripping” service).
3. The protected router’s auth middleware is never invoked because the request never matches that router’s rule; it matched the public router first.
Thus an unauthenticated attacker can bypass any authentication/authorization middleware simply by injecting a semicolon‑delimited path‑parameter before a dot‑segment that would otherwise trigger a traversal check.
The flaw is not a classic directory‑traversal (the file system is never accessed with ../). Instead it is an authorization bypass caused by incomplete path normalisation – a classic “path‑parameter bypass” that falls under CWE‑22 because the intended path‑restriction logic is subverted.
⚡ Attack Chain
1. Discovery & Reconnaissance
| Step | How the attacker proceeds |
|---|---|
| Fingerprint Traefik | • Scan the target for common Traefik‑specific headers (Server: traefik, X-Forwarded-Proto, X-Traefik-Backend) or the default health‑check endpoint (/ping). <br>• Use tools such as httprecon, nmap (nmap -sV -p 80,443 <IP>), or Shodan queries for “traefik”. |
| Determine version | • If the Server header includes a version string (e.g., Server: traefik/2.11.58), the attacker knows the instance is vulnerable. <br>• When the version is hidden, the attacker can infer it from the Traefik dashboard (if exposed) or from error pages that embed the version. |
| Map routers / middlewares | • Enumerate public routes by brute‑forcing common paths (/, /api, /admin, /login, /public). <br>• Observe which routes return 401/403 (protected) vs 200 (public). <br>• Identify a *public* router that forwards to the same backend as a *protected* router (e.g., both /public/* and /admin/* point to the same upstream service). |
2. Exploitation
Note: The exact path (/public/..;x/admin) is an illustrative example. The attack works on any public router that shares a backend with a protected router and where the protected path can be reached by inserting a..;segment before the protected segment.
2.1. Craft the malicious request
The request must contain a dot‑segment followed by a semicolon (..;) before the protected part of the path. The semicolon prevents Traefik’s dot‑segment removal, so the router matcher sees the request as a different path that still resolves to the same backend.
# Illustrative PoC using curl
# Public router: /public/
# Protected resource: /admin/secret
# Backend: http://backend.internal (shared)
curl -i -s -k "https://target.example.com/public/..;x/admin/secret"Explanation of the payload
| Component | Reason |
|---|---|
https://target.example.com | Target host running vulnerable Traefik. |
/public/ | Prefix that matches a public router (no auth middleware). |
..;x/ | Dot‑segment (..) followed by a path‑parameter (;x). The semicolon stops the normaliser from collapsing the ... |
admin/secret | The protected endpoint that would normally be guarded by auth middleware. Because the request matched the public router, the middleware chain for /admin/ is never evaluated. |
2.2. Expected server behaviour
- Traefik: *
- Backend service (e.g., an internal API) receives the request as
/admin/secret(most backends ignore the..;xsegment because it is stripped by the application or because the upstream is configured to treat it as a normal path component). The backend therefore processes the request as if it came from an authorized client. - CVSS 4.0 base score 9.3 (Critical) – Network‑remote, no authentication, low complexity, and high scope impact.
- No CISA KEV listing yet, but the vulnerability is publicly disclosed and the exploit is trivial (single‑line
curl). - Exploitability – An attacker only needs to know a public router that shares a backend with a protected router; this is common in micro‑service architectures where a single upstream serves both public and admin APIs.
sanitizePath sees /public/..;x/admin/secret → leaves ..;x untouched.
* Router matching: the request matches the public router (PathPrefix(/public/)).
* Middleware chain: only the public router’s middlewares (none or generic logging) are applied.
* Backend selection: forwards to the shared upstream (http://backend.internal).2.3. Variations
| Variation | How to adapt the payload |
|---|---|
| Different public prefix | Replace /public/ with any other public router prefix that shares the backend (e.g., /api/). |
| Multiple semicolons | The attacker can chain several ..; segments (/..;a/..;b/) to bypass deeper router hierarchies. |
| Encoded semicolon | Some front‑ends may URL‑decode before passing to Traefik; using %3B works if the decoder runs after the sanitiser. Example: /public/..%3Bx/admin. |
| Trailing slash omission | If the protected router does not require a trailing slash, the payload can be /public/..;xadmin. |
3. Post‑exploitation
| Goal | How it is achieved |
|---|---|
| Access protected resources | The attacker can read confidential data, invoke admin APIs, or download configuration files that are normally behind authentication. |
| Privilege escalation inside the backend | If the backend trusts the source IP (e.g., internal services only allow traffic from the reverse proxy) and the attacker can now reach privileged endpoints, they may gain administrative actions (user creation, configuration changes). |
| Web‑shell / RCE | In environments where the protected endpoint provides file upload or command execution (e.g., /admin/upload), the attacker can upload a web‑shell or trigger remote code execution. |
| Lateral movement | By abusing admin APIs (e.g., Kubernetes service‑account token retrieval, Docker socket exposure), the attacker can pivot to other services in the internal network. |
| Persistence | The attacker can create new privileged users or modify configuration via the now‑accessible admin endpoints, ensuring continued access even after the initial bypass is patched. |
🌍 Real‑World Impact
| CIA Triad | CVSS‑derived impact | Practical consequence |
|---|---|---|
| Confidentiality (SC:H) | High – The vulnerability allows an unauthenticated remote attacker to reach *sensitive* resources that are otherwise protected. | Exposure of admin dashboards, internal APIs, configuration files, user data, secrets (API keys, tokens). |
| Integrity (SI:L) | Low‑to‑Medium – The attacker can modify data only if the protected endpoint permits write operations (e.g., configuration changes, user creation). | Potential for privilege escalation, creation of back‑door accounts, or tampering with business‑critical data. |
| Availability | None (VA:N) – The flaw does not directly cause denial‑of‑service. However, an attacker could trigger heavy admin operations that indirectly affect availability. | Rarely a DoS vector, but possible resource exhaustion if admin endpoints are abused. |
Overall risk: Because the attack is network‑remote, requires no authentication, and has low complexity, the practical risk is severe for any environment that relies on Traefik for protecting admin interfaces or internal APIs.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected version range | Fixed version |
|---|---|
traefik 2.11.0 – 2.11.61 | 2.11.62 |
traefik 3.0.0 – 3.7.17 | 3.7.18 |
traefik 3.8.0‑rc.1 | 3.8.0‑rc.2 (or any later stable release) |
Action: Upgrade every Traefik instance to at least the fixed version. Verify the version with traefik version or via the dashboard.
2. Immediate Work‑arounds (if patch cannot be applied instantly)
| Work‑around | Implementation details |
|---|---|
Disable sanitizePath | Set entryPoints.<name>.forwardedHeaders.insecure = true and entryPoints.<name>.sanitizePath = false in the static configuration. This forces Traefik to reject malformed paths (it will return 400 Bad Request for any .. segment). |
| Enforce strict path matching | Use the Path rule (exact match) instead of PathPrefix for any router that protects sensitive resources. Example: rule = "Path(/admin/secret)". |
| Add a dedicated “auth‑only” router | Create a router that matches all requests before any public router and attaches the required auth middleware. Place it *before* the public router in the configuration file (Traefik evaluates routers in order of priority). |
| Strip path‑parameters at the edge | Deploy a small middleware (e.g., a custom plugin or a Headers middleware that rewrites the URL) that removes any ;‑delimited parameters before routing. Example using the built‑in ReplacePathRegex middleware: <br>``yaml<br>middlewares:<br> stripParams:<br> replacePathRegex:<br> regex: ";[^/]*"<br> replacement: ""<br>` |
| Network segmentation | Restrict access to the Traefik dashboard and any admin‑only routers to trusted IP ranges (e.g., via IPWhiteList middleware). This does not fix the bypass but limits exposure. |
| WAF / ModSecurity rule | Deploy a rule that rejects any request containing a ..; sequence. Example ModSecurity rule: <br>`SecRule REQUEST_URI "@contains ..;" "id:100001,phase:1,deny,status:403,msg:'Blocked Traefik path‑parameter traversal bypass'"`` |
3. Detection
| Indicator | Where to look | Example log line |
|---|---|---|
| Unexpected 200/302 on protected endpoints | Traefik access logs (access.log) | 127.0.0.1 - - [27/Nov/2026:12:34:56 +0000] "GET /public/..;x/admin/secret HTTP/1.1" 200 4523 "-" "Mozilla/5.0" |
Requests containing ..; | Access logs, reverse‑proxy logs, or SIEM | GET /api/..;a/config HTTP/1.1 |
| Router‑selection anomalies | Enable traefik.log.level=DEBUG and look for router field mismatches. | level=debug msg="router \"public-router\" selected for request" router=public-router (followed by a request that should have matched admin-router). |
| Backend logs showing admin endpoint hits from unknown IPs | Backend service logs (e.g., API server) | INFO 2026-11-27T12:34:56Z Received request GET /admin/secret from 203.0.113.45 |
| ModSecurity alerts (if rule added) | ModSecurity audit log | Message: Blocked Traefik path‑parameter traversal bypass |
Alerting recommendation: Create a SIEM correlation rule that fires when a request contains the pattern \.\.; and the response status is 2xx while the requested path is known to be protected.
⚠️ Urgency
If you run any of the affected versions in production, schedule the upgrade within the next 24‑48 hours.*
Apply one of the mitigations (disable sanitizePath or block ..; via WAF) right now to reduce exposure while the upgrade is in progress.
Bottom line: The flaw stems from an incomplete path‑normalisation step that treats semicolon‑delimited dot‑segments as literal characters, allowing an attacker to slip past router‑level authentication. Because the bypass works over the network without credentials, it must be treated as a critical remote‑code‑execution‑enabling issue and remediated without delay.
[🤖 CVE Professor AI Security Engine]
FOFA Query