Summary
Traefik: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') and Incorrect Authorization
Advisory details
Summary
There is a high-severity request-smuggling vulnerability in Traefik's handling of the HTTP/1.1 Upgrade mechanism. Since Traefik moved to unencrypted HTTP/2 with prior knowledge (Go 1.24), a client-initiated Upgrade: h2c request header and its connection-specific HTTP2-Settings header were forwarded to the backend. A backend that honours the h2c upgrade and answers 101 Switching Protocols puts Traefik into a raw byte tunnel that bypasses the router and the entire middleware chain (authentication, IPAllowList, rate limiting) on a shared backend. The fix stops forwarding the Upgrade: h2c token and the HTTP2-Settings header; Upgrade: websocket is unaffected. Exploitation requires a backend that upgrades h2c without validating the Connection listing; common off-the-shelf servers were not exploitable in testing.
Traefik v3.4.2 through v3.6 are end-of-life and are also affected; users on those versions must upgrade to v3.7.13.
Patches
- https://github.com/traefik/traefik/releases/tag/v2.11.57
- https://github.com/traefik/traefik/releases/tag/v3.7.13
For more information
If you have any questions or comments about this advisory, please open an issue.
Original Description
Summary
Traefik's default HTTP reverse proxy forwards arbitrary Connection: Upgrade / Upgrade: <token> requests to the backend. Upgrade tokens are not restricted to protocols explicitly supported by Traefik.
This is exploitable when a backend accepts a non-WebSocket upgrade such as h2c and responds with 101 Switching Protocols. Traefik then switches the connection into a raw byte tunnel and stops applying the HTTP routing/middleware chain.
An attacker can abuse an unprotected router pointing to the backend to establish the tunnel, then send HTTP/2 requests to other paths on the same backend. Those requests bypass the Traefik router and are therefore not subject to middleware attached to the corresponding protected route.
For example:
/public /admin
(no auth) (BasicAuth)
| |
+----------- same backend ------+
^
|
h2c tunnel
|
attacker
This allows middleware such as BasicAuth, ForwardAuth, IPAllowList, and RateLimit to be bypassed. Requests sent over the tunnel also bypass Traefik's normal access logging, metrics, and tracing.
The core issue is unrestricted client-initiated protocol upgrades combined with loss of the HTTP routing/middleware layer after 101 Switching Protocols.
Technical Details
The default proxy implementation is pkg/proxy/httputil (the fast proxy remains experimental and is disabled by default).
The relevant request path is:
pkg/middlewares/forwardedheaders/forwarded_header.go(removeConnectionHeaders, ~lines 198-234)When
Connection: Upgradeis present, theUpgradeheader is preserved and forwarded downstream. There is no validation that the upgrade token iswebsocket.pkg/proxy/httputil/proxy.go(isWebSocketUpgrade, ~line 170)WebSocket receives special header handling through
cleanWebSocketHeaders, but this is not an allowlist. Other upgrade protocols are still passed through.pkg/server/service/smart_roundtripper.go(RoundTrip, ~line 56)Requests containing
Connection: Upgradeare sent to the backend over HTTP/1, allowing the backend to perform the upgrade.net/http/httputil.ReverseProxyWhen the backend returns
101 Switching Protocols, the reverse proxy switches to tunnel mode and copies bytes between the client and backend.
The security boundary breaks at this point.
The Traefik router and middleware chain are selected only for the initial HTTP/1 request. After the backend returns 101, Traefik no longer parses the connection as HTTP requests and does not re-run routing or middleware for subsequent HTTP/2 streams.
The resulting flow is:
Attacker
|
| GET /public
| Connection: Upgrade
| Upgrade: h2c
v
Traefik
|
| r-public (no auth)
v
Backend
|
| 101 Switching Protocols
v
[raw byte tunnel]
|
| HTTP/2 GET /admin
v
Backend
The /admin request never reaches the /admin router. It is sent directly to the backend over the existing tunnel.
I found no upgrade-token allowlist or h2c rejection in the relevant proxy path.
This is distinct from configured h2c support
Traefik already supports explicitly configured h2c backends. In that case, the operator opts into HTTP/2 communication through the h2c:// service scheme / transportH2C configuration.
This issue is different.
The upgrade is initiated by the client through the Upgrade header. Traefik forwards it regardless of whether the operator configured h2c for that backend.
Therefore, a plain HTTP/1 backend can still be affected if it happens to accept Upgrade: h2c and return 101. The protocol switch is initiated by the client, and Traefik does not gate it.
PoC
Reproduced against a Traefik binary built from master at commit 9bb0e55:
go build ./cmd/traefik
Go 1.26.4
Default configuration was used, with no encodedCharacters or upgrade-related options enabled.
1. Backend
The backend implements a minimal HTTP/1.1 → h2c upgrade handler.
It exposes:
/public— unauthenticated/admin— intended to be protected by Traefik
package main
import (
"bufio"
"fmt"
"net"
"net/http"
"strings"
"golang.org/x/net/http2"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/public", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "public ok\n")
})
mux.HandleFunc("/admin", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(
w,
"ADMIN SECRET DATA (proto=%s path=%s)\n",
r.Proto,
r.URL.Path,
)
})
h2s := &http2.Server{}
ln, _ := net.Listen("tcp", "127.0.0.1:9900")
for {
c, err := ln.Accept()
if err != nil {
return
}
go func(conn net.Conn) {
br := bufio.NewReader(conn)
var sb strings.Builder
for {
line, err := br.ReadString('\n')
if err != nil {
return
}
sb.WriteString(line)
if line == "\r\n" {
break
}
}
if strings.Contains(sb.String(), "Upgrade: h2c") {
conn.Write([]byte(
"HTTP/1.1 101 Switching Protocols\r\n" +
"Connection: Upgrade\r\n" +
"Upgrade: h2c\r\n\r\n",
))
h2s.ServeConn(conn, &http2.ServeConnOpts{
Handler: mux,
})
return
}
conn.Close()
}(c)
}
}
2. Traefik configuration
traefik.yml:
entryPoints:
web:
address: "127.0.0.1:9080"
providers:
file:
filename: "dynamic.yml"
dynamic.yml:
http:
routers:
r-public:
rule: "PathPrefix(`/public`)"
entryPoints: ["web"]
service: svc
r-admin:
rule: "PathPrefix(`/admin`)"
entryPoints: ["web"]
service: svc
middlewares: ["adminauth"]
middlewares:
adminauth:
basicAuth:
users:
- "admin:$2a$10$J33WYF/FCnoWm7PPeEG7leme9d.MioVmaTgJ49MemNXJtdbEyqfs."
services:
svc:
loadBalancer:
servers:
- url: "http://127.0.0.1:9900"
Both routers terminate on the same backend. Only /admin has authentication.
3. Attacker
The PoC first verifies that /admin is protected, then establishes an unauthenticated h2c tunnel through /public and sends /admin over t
References
- https://github.com/advisories/GHSA-w4v4-9rw7-5326
- https://github.com/traefik/traefik/security/advisories/GHSA-w4v4-9rw7-5326
- https://nvd.nist.gov/vuln/detail/CVE-2026-88008
- https://github.com/traefik/traefik/pull/13797
- https://github.com/traefik/traefik/commit/a277e94664ffc1ce9543df552d3bbf48d4d3b8b3
- https://github.com/traefik/traefik/releases/tag/v2.11.57
- https://github.com/traefik/traefik/releases/tag/v3.7.13
Related vulnerabilities
All Supply chain →- MEDIUMCVE-2026-96628
Arcane: Environment access token bypasses the admin-required authorization gate on `/api/debug/pprof`
- MEDIUMCVE-2026-58494
Wasmtime: WASI hard links bypass wasmtime-wasi's FilePerms for destination
- MEDIUMCVE-2026-102832
JupyterLab: Command link trust prompt in JupyterLab can trust a document other than the one clicked
- MEDIUMCVE-2026-103028
SFTPGo source-side file-pattern filter bypass during copy operations
- CRITICALCVE-2026-77459
Argo CD: AppProject destination-namespace and resource restrictions bypassed by PreDelete/PostDelete resource hooks
- CRITICALCVE-2026-88092
Microsoft Security Advisory CVE-2026-88092 - ASP.NET Core Security Feature Bypass Vulnerability