Details
Blast radius depends on the pool. With the default pool and a slow smuggled endpoint the crossing is
reliable for a converging victim. With a bounded pool one desync shifts the whole response queue:
measured with MaxIdleConnsPerHost 1 and a slow victim endpoint, 8 of 8 sequential victims read a
response that was not their own (1 the attacker's, 7 another user's, 0 their own). Traefik does not
expose MaxConnsPerHost, so the parallel cascade is weaker than Caddy's.
Proof of concept
poc/run.sh runs the official traefik:v3.6.23 image fronting real off-the-shelf backends over
HTTP/1.1, with attacker and victim in separate containers. Requires docker and python3. It builds
the attack client, pulls the stock images, and runs the scenarios below.
The attacker opens an H2 or H3 CONNECT to Traefik and sends a raw HTTP/1.1GET /delay/2?tag=ATTACKERSMUGGLED as the CONNECT body, then half-closes the stream. Traefik
forwards the CONNECT to the Go/Python backend, the backend answers a keep-alive non-2xx, keeps the
socket, and parses the trailing GET as a pipelined request, so a response to it is queued on that
socket. net/http returns the socket to Traefik's shared pool. The victim then sendsGET /get?tag=VICTIMOWN on its own connection, Traefik reuses the pooled backend socket, and the
victim reads the queued /delay response instead of its own. CROSS means the victim received a
response that was not its own.
Expected output from poc
== core: DEFAULT config, cross-user poisoning vs real off-the-shelf backends ==
[core-go-h2] h2->h2 CROSS
[core-go-h3] h3->h3 CROSS
[core-go-x] h2->h3 CROSS
[core-py-h2] h2->h2 CROSS
[core-py-h3] h3->h3 CROSS
== mechanism: sanitizePath off -> stock Apache 405 (the direct Caddy analogue) ==
[mech-ap-h2] h2->h2 CROSS
[mech-ap-h3] h3->h3 CROSS
== controls: must NOT cross ==
[ctl-apache] h2->h2 NO_CROSS
[ctl-pooloff] h2->h2 NO_CROSS
[ctl-kaoff] h2->h2 NO_CROSS
== safe variant: experimental FastProxy chunk-frames the CONNECT body ==
[safe-fast] h2->h2 NO_CROSS
== cascade: bounded pool, one desync poisons a queue of victims ==
smuggled=1 other_user=7 own=0 of 8 (cross-user poisoned=8)
RESULT: PASS
- Core rows. DEFAULT Traefik config against a Go backend (
go-httpbin) and a Python gunicorn/Flask backend (kennethreitz/httpbin), for H2->H2, H3->H3, and H2->H3. The victim reads the attacker's smuggled response. - Mechanism rows.
sanitizePathoff and stock Apache. Traefik emits authority-formCONNECT apache-backend:80, Apache answers a keep-alive405, and it crosses. This is the direct Caddy analogue and proves the full mechanism including Apache. - Control rows.
ctl-apacheruns the default config against Apache, which closesCONNECT /;ctl-pooloffdisables Traefik backend reuse (maxIdleConnsPerHost: -1);ctl-kaoffruns Apache withKeepAlive Off. All three printNO_CROSS, so the crossing depends on backend socket reuse, not pipelining or a shared client. - Safe variant. Experimental FastProxy against the Go backend prints
NO_CROSSbecause it chunk-frames the CONNECT body. - Cascade.
MaxIdleConnsPerHost 1and a slow victim endpoint. One CONNECT desync shifts the queue: of 8 sequential victims, 1 reads the attacker's smuggled response, 7 read another user's response, 0 read their own.
The captured crossing (poc/evidence/RELEASE_v3.6.23_victim.json): the victim sentGET /get?tag=VICTIM_OWN and received a 200 whose body is the response toGET /delay/2?tag=ATTACKER_SMUGGLED with the echoed header X-Smuggled: released-v3.6.23, none of
which the victim sent.
Not affected
- HTTP/1.1 frontend. An H1 CONNECT body cannot reach EOF without closing the connection, so the backend socket is not pooled.
- Experimental FastProxy (
experimental.fastProxy). It chunk-frames the forwarded CONNECT body (Transfer-Encoding: chunked, captured inpoc/evidence/wire_fastproxy_chunked.txt), so the trailing bytes are read as the CONNECT body, not a pipelined request.safe-fastisNO_CROSS.
ForwardAuth
The ForwardAuth middleware with forwardBody: true and preserveRequestMethod: true re-issues the
request to the auth server as a CONNECT with the buffered body re-attached and ContentLength never
set (pkg/middlewares/auth/forward.go). The auth client writes that body unframed to the auth
server (captured on the wire), so a keep-alive non-2xx from the auth server poisons the shared
auth-client pool the same way.
Root cause
net/http pools a connection after a keep-alive non-2xx response to a CONNECT whose body it wrote
unframed. Traefik's default proxy forwards client CONNECT through a shared net/http.Transport and
applies no CONNECT rejection. sanitizePath changes the emitted request target but does not remove
the defect. Traefik's own FastProxy implementation frames the CONNECT body and does not cross, which
shows this is a property of the httputil/net/http path, not fixed by path normalization.
POC
</details>
---