Skip to content
Access control Write-up Advanced

CVE-2026–88008 Explained: One “101 Switching Protocols” Erases Every Middleware Traefik Has

Traefik forwards a client-supplied h2c upgrade request to the backend without checking the upgrade token, and when the backend answers with 101 Switching Protocols the connection becomes a raw byte tunnel. Requests sent over that tunnel, such as an HTTP/2 request to a BasicAuth-protected path, skip Traefik's router and middleware entirely, so an unauthenticated attacker can reach protected data.

WhitGuidance Follow

Published on medium.com

Cybersecurity

WhitGuidance, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

Context

Traefik's security model rests on a single assumption: a router decides which backend a request goes to, and the middleware attached to that router, such as BasicAuth, ForwardAuth, IPAllowList or RateLimit, handles authentication and authorisation. For that model to hold, every request has to pass through the router and its middleware, with no detours.

CVE-2026-88008 is the case where that assumption breaks. Since Go 1.24, Traefik supports unencrypted HTTP/2 with prior knowledge (h2c), and that support opened a path in which a client-supplied Connection: Upgrade and Upgrade: h2c header pair is forwarded to the backend without any validation. If the backend accepts the upgrade and answers with 101 Switching Protocols, Traefik stops treating the connection as a stream of HTTP requests and turns it into a raw tunnel that copies bytes between the client and the backend. Routing and middleware selection only ever happened for the first HTTP/1 request, so every HTTP/2 request that travels through the tunnel afterwards skips the router and the middleware chain entirely.

The practical consequence described in the write-up: an attacker opens an h2c tunnel through a completely unauthenticated public path (/public) and then reaches a BasicAuth-protected path (/admin) on the same backend, with no credentials at all.

From the original on medium.com

Setup

The scenario used to demonstrate the issue is a Traefik instance with two routers pointing at the same backend: /public with no authentication, and /admin protected by BasicAuth. The flaw lives in the default proxy implementation, pkg/proxy/httputil, and the analysis follows the Upgrade header through four points in that code path.

The demonstration routes both paths to the same backend. The report notes that separating services so protected and public paths never share a backend is a workable interim mitigation, since an opened tunnel then cannot reach the protected path.

Finding it

The starting observation is that the Upgrade header is never checked against an allowlist. The flow is straightforward to follow: a client sends GET /public with Connection: Upgrade and Upgrade: h2c, Traefik forwards the upgrade to the backend through the unauthenticated r-public router, the backend replies 101 Switching Protocols, and from that moment the connection is a raw byte tunnel. A new HTTP/2 request for /admin sent over that same connection reaches the backend directly, and BasicAuth is never applied.

Text
┌───────────────┐   GET /public              ┌──────────┐│               │   Connection: Upgrade       │          ││    Attacker   │──Upgrade: h2c──────────────▶│ Traefik  ││               │                              │          │└───────────────┘                              └────┬─────┘                                                      │ r-public (no auth)                                                      ▼                                                 ┌──────────┐                                                 │ Backend  │                                                 └────┬─────┘                                                      │ 101 Switching Protocols                                                      ▼                                              [ raw byte tunnel ]                                                      │                                                      │ HTTP/2 GET /admin                                                      ▼                                                 ┌──────────┐                                                 │ Backend  │──▶ /admin (BasicAuth never applied)                                                 └──────────┘

Exploitation

Step 1: the Upgrade header has no allowlist

removeConnectionHeaders() in pkg/middlewares/forwardedheaders/forwarded_header.go (around lines 198 to 234) removes the hop-by-hop headers named in a Connection header. When Connection: Upgrade is present, however, the Upgrade header itself is treated as something to preserve rather than something to strip. Nothing in that function checks whether the value is websocket, h2c, or an arbitrary token invented by the attacker.

Step 2: WebSocket handling is special treatment, not an allowlist

isWebSocketUpgrade() in pkg/proxy/httputil/proxy.go (around line 170) applies cleanWebSocketHeaders() specifically to WebSocket upgrade requests. It looks like logic that allows WebSocket and blocks everything else, but it only adds extra handling for WebSocket. No code rejects other upgrade tokens, h2c included. When isWebSocketUpgrade() returns false, the request simply continues as an ordinary upgrade request.

Step 3: smart_roundtripper forwards the upgrade over HTTP/1

RoundTrip() in pkg/server/service/smart_roundtripper.go (around line 56) sends a request carrying Connection: Upgrade to the backend over HTTP/1. At this point the request has merely been forwarded; the security boundary collapses in the next step.

Step 4: the 101 response erases routing and middleware

Traefik's default proxy uses the standard library's net/http/httputil.ReverseProxy. When the backend answers 101 Switching Protocols, ReverseProxy switches the connection into a tunnel mode that copies bytes between client and backend. In isolation this is standard behaviour that exists to proxy WebSocket connections.

The problem is that Traefik's router and middleware selection happen only for that one initial HTTP/1 request. Once the 101 response opens the tunnel, Traefik no longer treats the connection as a flow of HTTP requests it needs to interpret. A new HTTP/2 stream, which is a brand-new HTTP request, arriving over that tunnel is never routed from scratch and no middleware touches it.

The published proof of concept opens the tunnel and then issues the protected request over it:

Text
raw, _ := net.Dial("tcp", front)raw.Write([]byte(    "GET /public HTTP/1.1\r\n" +        "Host: x\r\n" +        "Connection: Upgrade, HTTP2-Settings\r\n" +        "Upgrade: h2c\r\n" +        "HTTP2-Settings: AAMAAABkAAQAoAAAAAIAAAAA\r\n" +        "\r\n",))cc, _ := (&http2.Transport{}).NewClientConn(raw)req, _ := http.NewRequest("GET", "http://x/admin", nil)r2, _ := cc.RoundTrip(req)

The first block dials the front end and writes an HTTP/1.1 request for /public that announces an h2c upgrade, including the HTTP2-Settings header. NewClientConn then takes over the already-open connection as an HTTP/2 client connection, and RoundTrip sends a fresh GET /admin as an HTTP/2 stream over it. The attacker never sends a request to /admin directly. They turn the connection established through the unauthenticated /public router into a tunnel and issue the new HTTP/2 request over that same TCP connection. From Traefik's point of view it processed exactly one /public request; whatever flows over the connection afterwards is invisible to it.

What the PoC returned

With /public (no auth) and /admin (BasicAuth) both routed to the same backend, the published PoC produced:

Text
[1] Direct GET /admin (no creds)      -> 401 Unauthorized[2] Upgrade: h2c to /public (no auth) -> "HTTP/1.1 101 Switching Protocols"[3] HTTP/2 GET /admin over tunnel     -> 200 "ADMIN SECRET DATA (proto=HTTP/2.0 path=/admin)"

/admin returns 401 when requested directly and 200 with the protected data once reached through the h2c tunnel. BasicAuth, ForwardAuth, IPAllowList, RateLimit, every middleware attached to that router, is bypassed. Requests sent through the tunnel also do not appear as individual requests in Traefik's normal access logs, metrics or tracing.

Root cause

The root cause is the combination of two behaviours. The Upgrade header is forwarded without an allowlist, so a client can request an h2c upgrade on any route, and the standard library's ReverseProxy treats a 101 Switching Protocols response as a signal to stop parsing HTTP and start copying bytes. Traefik's routing and middleware decisions are made once, for the initial HTTP/1 request, and are never re-applied to anything that arrives over the resulting tunnel. The WebSocket-specific code path gave the appearance of an allowlist without providing one, so no existing defence rejected the h2c token.

This is distinct from operator-configured h2c support. Traefik already lets operators enable h2c backend communication through the h2c:// service scheme or the transportH2C setting, and this vulnerability is unrelated to that feature. Here the upgrade is initiated by the client, not the operator, and Traefik forwards it regardless of whether h2c is configured for that backend. An ordinary HTTP/1 backend that the operator never intended to speak h2c can be affected, as long as its implementation accepts Upgrade: h2c and answers with 101.

Not every backend is vulnerable. Recent golang.org/x/net/http2/h2c implementations no longer support the HTTP/1.1 upgrade mechanism, so a current Go-based h2c server using that implementation is not exposed through this path. Older implementations, non-Go servers, custom h2c handlers and some gRPC-adjacent stacks may still accept the upgrade.

Impact

An attacker who can reach an unauthenticated route on a Traefik instance whose backend accepts the h2c upgrade can reach protected routes on that same backend without credentials, bypassing the middleware attached to that router. Because tunnelled requests do not appear as individual entries in Traefik's access logs, metrics or tracing, detection through those channels is limited. The impact depends on the backend answering 101 to Upgrade: h2c; the demonstration routes protected and public paths to the same backend.

Fix

Traefik 2.11.57 and 3.7.13 stop forwarding the Upgrade: h2c token and its accompanying HTTP2-Settings header to the backend. Upgrade: websocket is unaffected and continues to work as before.

The general principle: any component that must guarantee requests pass through a specific layer, such as routing or authentication, before reaching their destination should restrict protocol-switching mechanisms that can bypass that layer (Upgrade, CONNECT and similar) to an explicit allowlist. Special handling for WebSocket does not mean anything that is not WebSocket gets rejected. Code that handles a response such as 101 Switching Protocols, which fundamentally redefines what the connection is, needs to re-verify that its security layer still applies after the transition, not only before it.

Remediation steps from the write-up:

  1. Update Traefik to 2.11.57 or 3.7.13 or later immediately. The 3.4.2 to 3.6 branches are end-of-life, so migrate to 3.7.13.
  2. If an immediate update is not possible, separate services so that protected and public paths never share the same backend. With different backends, an opened tunnel cannot reach the protected path.
  3. Check directly whether your backend accepts Upgrade: h2c and responds with 101. If it does not, the precondition does not hold for your environment.
  4. Even after patching, tunnelled requests never appeared as individual entries in normal access logs, so confirming past exploitation cannot rely on access logs alone. Cross-check backend-side logs where available and look for unusual long-lived connections or upgrade-request patterns.

Variants to test

  1. Send an h2c upgrade to an unauthenticated route and then issue a request for a protected route over the resulting connection. A positive result is a 101 Switching Protocols followed by a 200 carrying protected content that returns 401 when requested directly.
  2. Test other upgrade tokens that the backend might accept, since the forwarding logic does not restrict the token. A positive result is a 101 response and a connection that Traefik stops parsing as HTTP.
  3. Test backends that are not Go-based, custom h2c handlers and gRPC-adjacent stacks, which may still accept the HTTP/1.1 upgrade. A positive result is a 101 response to the upgrade request.
  4. Test configurations where public and protected paths share a backend, and compare with configurations where they do not. A positive result is that only the shared-backend configuration allows the protected path to be reached over the tunnel.
  5. After any suspected exposure, review backend-side logs and connection durations for long-lived connections or upgrade-request patterns, since Traefik's own access logs do not record the tunnelled requests individually.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 16 min read.

What happened, in plain words

Imagine a building with a reception desk at the front. Every visitor has to walk past reception, show their badge, and only then get pointed to the right office. The receptionist is the security check, and the corridors behind it are the offices.

Traefik is a piece of software that sits in front of websites and applications and does exactly that job. It is a reverse proxy: a program that receives every request coming from the internet, decides which internal server (called a backend) should handle it, and applies security checks on the way. Those checks are called middleware. Examples are BasicAuth (ask for a username and password), ForwardAuth (ask a separate service whether this visitor is allowed), IPAllowList (only let certain network addresses in) and RateLimit (only allow so many requests per minute).

The whole security model of Traefik rests on one promise: every single request goes through the router and its middleware. No shortcuts, no side doors.

CVE-2026-88008 is a case where that promise breaks. A CVE is a public catalogue number for a known security flaw, so people can talk about the same bug unambiguously. The flaw lets an attacker walk in through a public, unprotected entrance and then, without ever showing a badge, reach a protected office behind it.

The trick involves a feature of the HTTP protocol called a protocol upgrade. Normally a browser and a server exchange short request-and-response messages. Sometimes both sides agree to stop doing that and switch the same connection to a different way of talking. The most familiar example is WebSocket, used by chat apps and live dashboards: the browser asks to upgrade, the server agrees, and from then on the connection stays open and both sides push data freely. The server signals agreement with a special status code, 101 Switching Protocols.

Traefik supports a second kind of upgrade called h2c, which stands for HTTP/2 over cleartext (unencrypted) connections. HTTP/2 is a newer, faster version of HTTP. Since Go 1.24 (Go is the programming language Traefik is written in), Traefik can speak h2c.

The bug is that Traefik passes an upgrade request from the client to the backend without checking whether the requested upgrade type is one it should allow. If the backend agrees and answers 101 Switching Protocols, Traefik stops reading the connection as a series of HTTP requests and turns it into a raw tunnel: a pipe that blindly copies bytes back and forth between the visitor and the backend. Traefik only made its routing and security decisions for the very first request. Everything that travels through the tunnel afterwards is invisible to it.

So an attacker opens a tunnel through a completely open path, /public, and then sends a request for a protected path, /admin, through that same tunnel. The backend answers, and BasicAuth never gets a chance to say no.

From the original on medium.com

The setup used to demonstrate it

The demonstration uses a Traefik instance with two routes pointing at the same backend:

  • /public, with no authentication at all.
  • /admin, protected by BasicAuth.

A route (Traefik calls it a router) is a rule that says "requests whose address starts with this path go to that backend". A path is the part of a web address after the domain, so in https://example.com/admin the path is /admin.

The flaw lives in Traefik's default proxy code, in a package (a folder of source code) called pkg/proxy/httputil. The analysis follows the Upgrade header through four points in that code. A header is a small labelled line that travels with every HTTP request or response, carrying extra information such as what kind of content the browser accepts or whether the connection should be upgraded.

Two things matter for the demonstration:

  1. The backend must accept the Upgrade: h2c request and answer with 101 Switching Protocols.
  2. In the demonstration, the protected and public paths are served by the same backend, because the tunnel is opened to the backend behind the public route, and the later HTTP/2 requests are handled by that backend, not by Traefik.

Finding it

The starting observation is simple: the Upgrade header is never checked against an allowlist. An allowlist is a list of things that are explicitly permitted, with everything else refused. Think of a guest list at a door: if your name is on it you get in, otherwise you do not. Traefik had no such list for upgrade types.

The flow is easy to follow:

  1. A client sends GET /public with Connection: Upgrade and Upgrade: h2c.
  2. Traefik forwards the upgrade to the backend through the unauthenticated r-public router.
  3. The backend replies 101 Switching Protocols.
  4. From that moment the connection is a raw byte tunnel.
  5. A new HTTP/2 request for /admin sent over that same connection reaches the backend directly, and BasicAuth is never applied.
Text
┌───────────────┐   GET /public              ┌──────────┐│               │   Connection: Upgrade       │          ││    Attacker   │──Upgrade: h2c──────────────▶│ Traefik  ││               │                              │          │└───────────────┘                              └────┬─────┘                                                      │ r-public (no auth)                                                      ▼                                                 ┌──────────┐                                                 │ Backend  │                                                 └────┬─────┘                                                      │ 101 Switching Protocols                                                      ▼                                              [ raw byte tunnel ]                                                      │                                                      │ HTTP/2 GET /admin                                                      ▼                                                 ┌──────────┐                                                 │ Backend  │──▶ /admin (BasicAuth never applied)                                                 └──────────┘

Reading the diagram from top to bottom:

  • The box on the left is the attacker, the person sending requests.
  • The arrow labelled GET /public with Connection: Upgrade and Upgrade: h2c is the first request: it asks for the public path and announces that the client wants to switch the connection to h2c.
  • The middle box is Traefik, which receives that request.
  • The downward arrow labelled r-public (no auth) shows Traefik choosing the public router, which has no authentication attached.
  • The next box is the backend, the actual application server behind Traefik.
  • The arrow labelled 101 Switching Protocols is the backend agreeing to the upgrade.
  • The bracket labelled [ raw byte tunnel ] is the result: the connection is no longer treated as HTTP requests, just as a pipe for bytes.
  • The arrow labelled HTTP/2 GET /admin is a brand-new request sent through that pipe.
  • The final box shows the backend answering /admin with BasicAuth never applied.

Exploitation, step by step

Step 1: the Upgrade header has no allowlist

The function removeConnectionHeaders() in pkg/middlewares/forwardedheaders/forwarded_header.go, around lines 198 to 234, removes hop-by-hop headers. A hop-by-hop header is one that only concerns a single connection between two machines, not the request as a whole, so a proxy is supposed to consume it rather than pass it on. The Connection header lists which headers are hop-by-hop for this particular request.

When Connection: Upgrade is present, however, the Upgrade header itself is treated as something to keep rather than something to remove. Nothing in that function checks whether the value is websocket, h2c, or an arbitrary word the attacker invented. A function here is simply a named block of code that does one job; removeConnectionHeaders() is the block whose job is to strip those connection-specific headers.

Step 2: WebSocket handling is special treatment, not an allowlist

The function isWebSocketUpgrade() in pkg/proxy/httputil/proxy.go, around line 170, applies cleanWebSocketHeaders() specifically to WebSocket upgrade requests. It looks like logic that allows WebSocket and blocks everything else, but it only adds extra handling for WebSocket. No code rejects other upgrade tokens, h2c included. When isWebSocketUpgrade() returns false, meaning "this is not a WebSocket upgrade", the request simply continues as an ordinary upgrade request.

This is the heart of the misunderstanding. A bouncer who gives VIP guests a special welcome is not the same as a bouncer who checks a guest list. Here, WebSocket got the special welcome, and everyone else walked straight past.

Step 3: smart_roundtripper forwards the upgrade over HTTP/1

The function RoundTrip() in pkg/server/service/smart_roundtripper.go, around line 56, sends a request carrying Connection: Upgrade to the backend over HTTP/1. HTTP/1.1 is the older, text-based version of the protocol, the one where each request and response is a readable block of lines. At this point the request has merely been forwarded. The security boundary collapses in the next step.

Step 4: the 101 response erases routing and middleware

Traefik's default proxy uses a component from Go's standard library called net/http/httputil.ReverseProxy. When the backend answers 101 Switching Protocols, ReverseProxy switches the connection into a tunnel mode that copies bytes between client and backend. On its own this is standard behaviour, and it exists so that WebSocket connections can be proxied.

The problem is that Traefik's router and middleware selection happen only for that one initial HTTP/1 request. Once the 101 response opens the tunnel, Traefik no longer treats the connection as a flow of HTTP requests it needs to interpret. A new HTTP/2 stream, which is a brand-new HTTP request, arriving over that tunnel is never routed from scratch and no middleware touches it. An HTTP/2 stream is one request-and-response exchange inside an HTTP/2 connection; HTTP/2 can carry several of them at once over the same connection.

The published proof of concept opens the tunnel and then issues the protected request over it:

Text
raw, _ := net.Dial("tcp", front)raw.Write([]byte(    "GET /public HTTP/1.1\r\n" +        "Host: x\r\n" +        "Connection: Upgrade, HTTP2-Settings\r\n" +        "Upgrade: h2c\r\n" +        "HTTP2-Settings: AAMAAABkAAQAoAAAAAIAAAAA\r\n" +        "\r\n",))cc, _ := (&http2.Transport{}).NewClientConn(raw)req, _ := http.NewRequest("GET", "http://x/admin", nil)r2, _ := cc.RoundTrip(req)

Line by line, in plain words:

  • raw, _ := net.Dial("tcp", front) opens a raw network connection to the front end, meaning Traefik. net.Dial is Go's way of saying "connect to this address over this protocol". The _ means "ignore the error value here", which keeps the example short. front is the address of the Traefik instance.
  • raw.Write([]byte( sends bytes down that connection. Everything inside the following string is the literal text of an HTTP request.
  • "GET /public HTTP/1.1\r\n" is the first line of the request: the method GET, the path /public, and the protocol version HTTP/1.1. \r\n is the invisible carriage-return-plus-line-feed pair that marks the end of a line in HTTP.
  • "Host: x\r\n" is the Host header, which normally names the website being requested. Here it is just x, a placeholder.
  • "Connection: Upgrade, HTTP2-Settings\r\n" tells the server that this connection is going to be upgraded, and that the HTTP2-Settings header is part of that upgrade negotiation.
  • "Upgrade: h2c\r\n" is the actual request: please switch this connection to h2c, unencrypted HTTP/2.
  • "HTTP2-Settings: AAMAAABkAAQAoAAAAAIAAAAA\r\n" carries the client's HTTP/2 settings, encoded as text. These settings tell the server how the client wants the HTTP/2 conversation configured.
  • "\r\n" on its own is the blank line that marks the end of the headers. Without it the server would keep waiting for more headers.
  • cc, _ := (&http2.Transport{}).NewClientConn(raw) takes the connection that is already open and wraps it in an HTTP/2 client. From now on, Go's HTTP/2 library can send requests over it as HTTP/2 streams.
  • req, _ := http.NewRequest("GET", "http://x/admin", nil) builds a new request for /admin. The nil at the end means there is no body, which is normal for a GET.
  • r2, _ := cc.RoundTrip(req) sends that request over the HTTP/2 connection and waits for the response.

The attacker never sends a request to /admin directly. They turn the connection established through the unauthenticated /public router into a tunnel, and then issue the new HTTP/2 request over that same TCP connection. TCP is the underlying network protocol that carries a reliable stream of bytes between two machines; it is what the HTTP conversation runs on top of. From Traefik's point of view it processed exactly one /public request. Whatever flows over the connection afterwards is invisible to it.

What the proof of concept returned

With /public (no auth) and /admin (BasicAuth) both routed to the same backend, the published proof of concept produced:

Text
[1] Direct GET /admin (no creds)      -> 401 Unauthorized[2] Upgrade: h2c to /public (no auth) -> "HTTP/1.1 101 Switching Protocols"[3] HTTP/2 GET /admin over tunnel     -> 200 "ADMIN SECRET DATA (proto=HTTP/2.0 path=/admin)"

Line by line:

  • [1] Direct GET /admin (no creds) -> 401 Unauthorized is the control test. The attacker asks for /admin the normal way, with no username or password. The server answers 401 Unauthorized, which is the standard status code for "you are not authenticated". This proves the protection is switched on.
  • [2] Upgrade: h2c to /public (no auth) -> "HTTP/1.1 101 Switching Protocols" is the tunnel being opened through the public path. The backend agrees to the upgrade.
  • [3] HTTP/2 GET /admin over tunnel -> 200 "ADMIN SECRET DATA (proto=HTTP/2.0 path=/admin)" is the protected request sent through the tunnel. 200 is the standard status code for success, and the body contains the protected data. The text in brackets is the backend reporting which protocol and path it saw.

So /admin returns 401 when requested directly and 200 with the protected data once reached through the h2c tunnel. BasicAuth, ForwardAuth, IPAllowList, RateLimit, every middleware attached to that router, is bypassed. Requests sent through the tunnel also do not appear as individual requests in Traefik's normal access logs, metrics or tracing. Access logs are the records a server keeps of the requests it handled. Metrics are numerical counters and timings. Tracing follows a single request as it moves through several systems. All three are blind to the tunnelled traffic.

Root cause

The root cause is the combination of two behaviours. The Upgrade header is forwarded without an allowlist, so a client can request an h2c upgrade on any route. And the standard library's ReverseProxy treats a 101 Switching Protocols response as a signal to stop parsing HTTP and start copying bytes. Traefik's routing and middleware decisions are made once, for the initial HTTP/1 request, and are never re-applied to anything that arrives over the resulting tunnel. The WebSocket-specific code path gave the appearance of an allowlist without providing one, so no existing defence rejected the h2c token.

This is distinct from h2c support that an operator configures on purpose. An operator is the person who runs and configures the Traefik instance. Traefik already lets operators enable h2c communication to backends through the h2c:// service scheme or the transportH2C setting, and this vulnerability is unrelated to that feature. Here the upgrade is initiated by the client, not the operator, and Traefik forwards it regardless of whether h2c is configured for that backend. An ordinary HTTP/1 backend that the operator never intended to speak h2c can be affected, as long as its implementation accepts Upgrade: h2c and answers with 101.

Not every backend is vulnerable. Recent golang.org/x/net/http2/h2c implementations no longer support the HTTP/1.1 upgrade mechanism, so a current Go-based h2c server using that implementation is not exposed through this path. Older implementations, non-Go servers, custom h2c handlers and some gRPC-adjacent stacks may still accept the upgrade. gRPC is a framework for calling functions on another machine as if they were local, and it commonly runs over HTTP/2.

Impact

An attacker who can reach an unauthenticated route on a Traefik instance whose backend accepts the h2c upgrade can reach protected routes on that same backend without credentials, bypassing the middleware attached to that router. Because tunnelled requests do not appear as individual entries in Traefik's access logs, metrics or tracing, detection through those channels is limited. The impact depends on the backend answering 101 to Upgrade: h2c; the demonstration routes protected and public paths to the same backend.

The fix

Traefik 2.11.57 and 3.7.13 stop forwarding the Upgrade: h2c token and its accompanying HTTP2-Settings header to the backend. Upgrade: websocket is unaffected and continues to work as before.

The general principle: any component that must guarantee requests pass through a specific layer, such as routing or authentication, before reaching their destination should restrict protocol-switching mechanisms that can bypass that layer (Upgrade, CONNECT and similar) to an explicit allowlist. CONNECT is another HTTP method that asks a proxy to open a raw connection to somewhere else. Special handling for WebSocket does not mean anything that is not WebSocket gets rejected. Code that handles a response such as 101 Switching Protocols, which fundamentally redefines what the connection is, needs to re-verify that its security layer still applies after the transition, not only before it.

Remediation steps from the write-up:

  1. Update Traefik to 2.11.57 or 3.7.13 or later immediately. The 3.4.2 to 3.6 branches are end-of-life, so migrate to 3.7.13. A branch here is a line of development with its own version numbers; end-of-life means it no longer receives fixes.
  2. If an immediate update is not possible, separate services so that protected and public paths never share the same backend. With different backends, an opened tunnel cannot reach the protected path.
  3. Check directly whether your backend accepts Upgrade: h2c and responds with 101. If it does not, the precondition does not hold for your environment.
  4. Even after patching, tunnelled requests never appeared as individual entries in normal access logs, so confirming past exploitation cannot rely on access logs alone. Cross-check backend-side logs where available and look for unusual long-lived connections or upgrade-request patterns.

Variants to test

  1. Send an h2c upgrade to an unauthenticated route and then issue a request for a protected route over the resulting connection. A positive result is a 101 Switching Protocols followed by a 200 carrying protected content that returns 401 when requested directly.
  2. Test other upgrade tokens that the backend might accept, since the forwarding logic does not restrict the token. A positive result is a 101 response and a connection that Traefik stops parsing as HTTP.
  3. Test backends that are not Go-based, custom h2c handlers and gRPC-adjacent stacks, which may still accept the HTTP/1.1 upgrade. A positive result is a 101 response to the upgrade request.
  4. Test configurations where public and protected paths share a backend, and compare with configurations where they do not. A positive result is that only the shared-backend configuration allows the protected path to be reached over the tunnel.
  5. After any suspected exposure, review backend-side logs and connection durations for long-lived connections or upgrade-request patterns, since Traefik's own access logs do not record the tunnelled requests individually.

Glossary

  • Access log: a record a server keeps of the requests it handled.
  • Allowlist: a list of things explicitly permitted, with everything else refused.
  • Backend: the internal server that actually runs the application behind a proxy.
  • BasicAuth: a middleware that asks for a username and password before letting a request through.
  • Branch: a line of development with its own version numbers.
  • CONNECT: an HTTP method that asks a proxy to open a raw connection to another destination.
  • CVE: a public catalogue number for a known security vulnerability.
  • ForwardAuth: a middleware that asks a separate service whether a request is allowed.
  • Function: a named block of code that performs one job.
  • gRPC: a framework for calling functions on another machine as if they were local, commonly over HTTP/2.
  • h2c: HTTP/2 over an unencrypted (cleartext) connection.
  • Header: a labelled line of extra information sent with an HTTP request or response.
  • Hop-by-hop header: a header that concerns only one connection between two machines, not the request as a whole.
  • HTTP/1.1: the older, text-based version of the HTTP protocol.
  • HTTP/2: a newer version of HTTP that can carry several requests at once over one connection.
  • IPAllowList: a middleware that only lets requests from certain network addresses through.
  • Middleware: a check or transformation applied to a request before it reaches the backend.
  • Operator: the person who runs and configures a system.
  • Path: the part of a web address after the domain, such as /admin.
  • Proof of concept (PoC): a small demonstration that a vulnerability can actually be exploited.
  • RateLimit: a middleware that only allows a certain number of requests per period.
  • Raw tunnel: a connection where bytes are copied back and forth without being interpreted as HTTP.
  • Reverse proxy: software that receives requests from the internet and forwards them to internal servers, applying checks on the way.
  • Route (router): a rule that decides which backend handles a request.
  • Status code: a three-digit number in an HTTP response saying what happened, such as 200 for success or 401 for not authenticated.
  • Stream: one request-and-response exchange inside an HTTP/2 connection.
  • TCP: the underlying network protocol that carries a reliable stream of bytes between two machines.
  • Tracing: following a single request as it moves through several systems.
  • Upgrade: an HTTP mechanism where client and server agree to switch the same connection to a different protocol.
  • WebSocket: a protocol for a persistent two-way connection, used by chat apps and live dashboards.

More by WhitGuidance

View all

40 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.