Back to Blog
Adversarial Machine Learning

HTTP Request Smuggling: Advanced Web Server Exploitation

OffSec Research Team
10 June 2026 • 09:00 AM15 min
HTTP Request Smuggling: Advanced Web Server Exploitation
TL;DR — HTTP Request Smuggling exploits a disagreement between two servers — typically a front-end proxy/CDN and a back-end origin — about where one HTTP request ends and the next begins. By crafting a request whose boundaries the two parse differently (classically via conflicting Content-Length and Transfer-Encoding headers), an attacker "smuggles" a hidden request that the back-end prepends to the next victim's traffic. This article explains the parsing-discrepancy root cause, the CL.TE / TE.CL / TE.TE / CL.CL variants, HTTP/2 downgrade smuggling, and the high-impact exploits — request hijacking, cache poisoning, security-control bypass — plus the normalisation that fixes it.

Executive Summary

Modern web architectures are chains: a client talks to a CDN, which talks to a load balancer, which talks to a reverse proxy, which talks to an origin server. For performance, these components reuse a single TCP/TLS connection to stream many requests back-to-back. That optimisation creates a critical dependency: every hop must agree, byte for byte, on where each request ends. If the front-end thinks a request is 100 bytes and the back-end thinks it's 150, the extra 50 bytes don't vanish — the back-end treats them as the start of the next request.

That is request smuggling in one sentence: a boundary disagreement that lets an attacker inject ("smuggle") a partial request which the back-end glues onto whatever genuine request arrives next — often a different user's request. The consequences are severe and stealthy: capturing other users' requests (including their session cookies), poisoning shared caches, bypassing front-end security controls (WAF, authentication enforced only at the proxy), and turning a benign-looking endpoint into a foothold for mass victim compromise.

The reason this class endures is that the HTTP/1.1 specification permits two ways to delimit a message body — Content-Length and Transfer-Encoding: chunked — and real-world servers handle their interaction inconsistently. Where two servers resolve an ambiguity differently, smuggling lives.

The Two Ways to End a Request Body

text
CONTENT-LENGTH                         TRANSFER-ENCODING: chunkedPOST /x HTTP/1.1                       POST /x HTTP/1.1Content-Length: 11                     Transfer-Encoding: chunked hello world                            b\r\n(body = exactly 11 bytes)              hello world\r\n                                       0\r\n\r\n                                       (body = chunks until a 0-size chunk)

The RFC says: if both headers are present, Transfer-Encoding takes precedence and Content-Length must be ignored. But not every server obeys this, and not every server even agrees on what counts as a valid Transfer-Encoding header. When the front-end honours one header and the back-end honours the other, their notions of the body length diverge — and the surplus or deficit becomes a smuggled request.

diagram — rendering…
flowchart TD
    A["Attacker sends one crafted request<br/>with conflicting CL / TE"] --> B["Front-end parses it one way<br/>(forwards N bytes)"]
    B --> C["Back-end parses it another way<br/>(sees a different boundary)"]
    C --> D["Leftover bytes treated as the<br/>START of the NEXT request"]
    D --> E["Smuggled prefix attaches to<br/>the next victim's request"]
    style E fill:#2a0c14,stroke:#ef233c,color:#fee2e2

Variant 1 — CL.TE (front-end uses Content-Length, back-end uses Transfer-Encoding)

http
POST / HTTP/1.1Host: vulnerable.exampleContent-Length: 13Transfer-Encoding: chunked 0 SMUGGLED
  • Front-end honours Content-Length: 13 → forwards all 13 bytes (0\r\n\r\nSMUGGLED) as one complete request.
  • Back-end honours Transfer-Encoding: chunked → reads the 0 chunk as "end of body" and stops. The trailing SMUGGLED is left in the buffer and treated as the beginning of the next request.

The next legitimate request that arrives on that connection gets SMUGGLED prepended to it. If the smuggled prefix is a partial request (e.g. GET /admin ... with an incomplete header), it merges with the victim's request line/headers.

Variant 2 — TE.CL (front-end uses Transfer-Encoding, back-end uses Content-Length)

http
POST / HTTP/1.1Host: vulnerable.exampleContent-Length: 3Transfer-Encoding: chunked 8SMUGGLED0  
  • Front-end honours chunked → reads the 8-byte chunk, then the 0 terminator → forwards the whole thing.
  • Back-end honours Content-Length: 3 → consumes only 8\r\n (3 bytes) and considers the request done. The remainder (SMUGGLED\r\n0\r\n\r\n) starts the next request.

CL.TE and TE.CL are mirror images; which one applies depends on the specific front-end/back-end pair, established empirically.

Variant 3 — TE.TE (both support Transfer-Encoding, but one is tricked into ignoring it)

Here both servers understand chunked encoding, so you'd expect agreement. The attack obfuscates the Transfer-Encoding header so that one server parses it as valid and the other rejects it as malformed (falling back to Content-Length):

http
Transfer-Encoding: chunkedTransfer-Encoding: x          ← duplicate, one server takes the lastTransfer-Encoding:chunked     ← no space; some parsers rejectTransfer-Encoding: chunked    ← trailing space / tab variationsTransfer-Encoding : chunked                     ← header-name with embedded whitespaceTransfer-Encoding: xchunked

If the front-end accepts the obfuscated header (uses TE) while the back-end rejects it (falls back to CL) — or vice versa — you've recreated a CL.TE/TE.CL discrepancy out of two TE-aware servers. TE.TE is about exploiting parser leniency differences in how the same header is validated.

Variant 4 — HTTP/2 Downgrade Smuggling

HTTP/2 was supposed to end smuggling: it uses a binary framing with explicit, unambiguous message lengths — no header-based body delimitation. But many deployments terminate HTTP/2 at the front-end and downgrade to HTTP/1.1 to talk to the back-end. The translation re-introduces Content-Length/Transfer-Encoding and, crucially, can carry over content the HTTP/2 layer didn't sanitise:

diagram — rendering…
flowchart LR
    A["Client → Front-end<br/>HTTP/2 (explicit lengths)"] --> B["Front-end downgrades<br/>to HTTP/1.1 for back-end"]
    B --> C["Reconstructs CL/TE headers,<br/>may trust attacker-set length<br/>or pass injected CRLFs"]
    C --> D["H2.CL / H2.TE smuggling,<br/>request-line/header injection"]
    style D fill:#2a0c14,stroke:#ef233c,color:#fee2e2
  • H2.CL — the front-end trusts an attacker-supplied content-length in the HTTP/2 request when generating the HTTP/1.1 body, desyncing the back-end.
  • H2.TE — an injected transfer-encoding: chunked survives the downgrade.
  • Request-line / header injection (CRLF) — HTTP/2 fields can contain bytes (CR, LF, colons) illegal in HTTP/1.1; if the downgrade doesn't strip them, the attacker injects entire extra headers or a second request line during translation.

This is the dominant modern smuggling surface, popularised by James Kettle's research, because so many CDNs and proxies front HTTP/1.1 origins.

What Smuggling Buys the Attacker

The desync itself is just a primitive; here's the weaponisation:

text
SMUGGLING IMPACT LADDER Capture other users' requests       ██████████  steal session cookies → ATO  (smuggle a prefix that makes the   victim's request append to your   stored/echoed endpoint)Bypass front-end security controls  █████████░  reach /admin the WAF/proxy blocksWeb cache poisoning                 ████████░░  poison shared cache → mass XSS/defacementCache deception                     ███████░░░  trick cache into storing private dataReflected exploit amplification     ██████░░░░  turn self-XSS into stored-for-others
  • Capturing victims' requests. The attacker smuggles a prefix that routes the next user's request (with their cookies, auth tokens, CSRF tokens) into an endpoint that stores or reflects the request body — then reads it back. This harvests session cookies of whoever happened to share the connection: a path to mass account takeover.
  • Bypassing front-end controls. If authentication, WAF rules, or path restrictions are enforced only at the front-end, a smuggled request goes straight to the back-end without front-end inspection. POST / (allowed) on the outside hides a smuggled GET /admin/delete?user=* that the back-end processes unfiltered.
  • Web cache poisoning. Combine smuggling with a caching layer: smuggle a request whose response gets cached against a legitimate URL, so every subsequent user is served attacker content — stored XSS, redirects, or defacement at scale.
  • Cache deception. Trick the cache into storing a victim's private, authenticated response under a cacheable key, then retrieve it.

The defining feature is that the victim is a stranger sharing the connection, which makes smuggling both high-impact and hard to attribute.

Detection Methodology

Smuggling is detected primarily through timing and differential responses, because the desync isn't visible in a single response.

text
DETECTION (CL.TE example) — the "timeout probe" POST / HTTP/1.1Host: targetContent-Length: 4Transfer-Encoding: chunked 1AX → If the back-end uses TE, it reads the "1\r\nA" chunk, then waits for  more chunks that never come → response HANGS (timeout) = CL.TE confirmed.→ A normal request returns promptly. The delay is the tell.

Practical approach:

  • Use Burp Suite's HTTP Request Smuggler extension — it automates CL.TE/TE.CL/TE.TE and HTTP/2 desync probes with timing-based detection and safe confirmation steps.
  • Time-based probes first. A crafted request that makes the back-end wait for more body data produces a measurable delay — the safest detection signal (it doesn't affect other users).
  • Then confirm with a differential. Smuggle a prefix that changes the response to a follow-up request you send yourself, proving the desync without harming third parties.
  • Be careful in production. Smuggling can corrupt real users' requests. Confirm responsibly, prefer self-targeted confirmation, and avoid persistent cache poisoning during testing.
Reporting tip: demonstrate concrete impact — capturing your own follow-up request via the desync, or reaching a front-end-blocked path — and emphasise the third-party blast radius. "Confirmed CL.TE desync; smuggled request reached /admin past the WAF and could capture concurrent users' cookies" communicates the real risk.

Defence: Make the Whole Chain Agree

diagram — rendering…
flowchart TD
    A["Goal: no parsing disagreement<br/>between front-end and back-end"] --> B["Use HTTP/2 end-to-end<br/>(no downgrade)"]
    A --> C["Normalise/reject ambiguous requests<br/>at the front-end"]
    A --> D["Front-end: reject conflicting<br/>CL + TE; strip obfuscated TE"]
    A --> E["Back-end: use the SAME parsing<br/>rules; don't reuse connection on error"]
    B & C & D & E --> F["No desync possible"]
    style F fill:#0c2a22,stroke:#21d48e,color:#d1fae5
  • Prefer HTTP/2 end-to-end. HTTP/2's explicit framing removes header-based body-length ambiguity. Eliminating the HTTP/1.1 downgrade between front-end and back-end removes the dominant modern smuggling surface. If you must downgrade, ensure the proxy rigorously sanitises and revalidates lengths and rejects illegal characters during translation.
  • Normalise ambiguous requests at the front-end. The front-end should reject (or canonicalise) any request that contains both Content-Length and Transfer-Encoding, duplicate headers, or obfuscated Transfer-Encoding values — rather than guessing. Ambiguity should be a 400, not a heuristic.
  • Ensure front-end and back-end use identical parsing. The bug is disagreement; using the same well-behaved server software/version and configuration across the chain minimises divergence. Where you can't, put a strict normaliser in front.
  • Disable connection reuse to the back-end (or use a fresh connection per request) where feasible — if connections aren't shared, a smuggled prefix has no victim request to attach to. This trades performance for safety and is a strong mitigation when other fixes lag.
  • Don't enforce security only at the front-end. Authentication, authorization, and critical access control should also be validated at the origin, so a smuggled request that bypasses the proxy still hits an authorization wall.
  • Patch proxies/CDNs/servers — smuggling fixes ship regularly as parser strictness improves. Keep the entire chain current.
  • Be cautious with caches. Ensure cache keys can't be desynced from the request the back-end actually served; segment private and public caches.

CL.0 Smuggling: The Serverless-Header Variant

A modern smuggling technique that doesn't require header conflicts at all. CL.0 (Content-Length Zero) exploits back-end servers that ignore the Content-Length header entirely for certain endpoints — treating every request body as empty, regardless of what Content-Length says. When a front-end correctly honours Content-Length and forwards the body, but the back-end ignores it, the entire body becomes a "next request" prefix from the back-end's perspective.

How CL.0 Works

http
POST /static/resource.js HTTP/1.1Host: vulnerable.exampleContent-Length: 53Connection: keep-alive GET /admin/delete-all-users HTTP/1.1X-Ignore: x
  • Front-end obeys Content-Length: 53 → forwards the request body (the second GET /admin/... string) as the body of the POST.
  • Back-end for /static/resource.js ignores Content-Length entirely (it's serving a static file; it doesn't parse POST bodies) → it considers the request done after the headers and treats the 53-byte body as a new incoming request.

The smuggled GET /admin/delete-all-users is then processed by the back-end as the next request in the pipeline — unfiltered by the front-end's WAF or authentication logic, which validated only the outer POST /static/resource.js.

Identifying CL.0-Vulnerable Endpoints

The fingerprint: send a POST with a body to an endpoint that typically accepts GET only (or that ignores bodies). If the response time is normal and the next request you send receives a garbled or unexpected response, the back-end processed your body as a new request:

bash
# Using Burp's HTTP Request Smuggler extension in "CL.0" mode# Or manually: send to endpoints like:#   /static/, /assets/, /favicon.ico, /health, /ping# These often serve responses without parsing the request body

CL.0 is particularly valuable in modern architectures where the back-end is a cloud function or specialised static server — many such components are not designed to handle request bodies at all.

Smuggling and Cache Poisoning: A Synergistic Attack

HTTP Request Smuggling and Web Cache Poisoning are individually powerful; combined, they become a persistent, scalable attack that converts a desync into mass stored-XSS or open redirect served to every victim who visits a popular URL.

The Poisoning Mechanism

diagram — rendering…
sequenceDiagram
    participant A as Attacker
    participant F as Front-end (CDN/proxy, caches responses)
    participant B as Back-end

    A->>F: Crafted smuggling request (desync)
    Note over F,B: Front-end forwards "one" request, back-end sees two
    B->>B: Processes smuggled prefix + victim's request URL as one response
    B-->>F: Response to /home?x=... (a cacheable URL) contains attacker content
    F->>F: Caches this poisoned response under the cache key for /home
    Note over F: Now EVERY user requesting /home gets the poisoned response
    A->>A: Reads /home from a different IP — gets the poisoned content

The key steps:

  • Set up the desync using CL.TE or TE.CL so the back-end has a pending prefix.
  • Design the prefix to change the method or path of the victim's request to something the back-end responds to with attacker-controlled content — for example, prepend GET /?x="><script>alert(1)</script> HTTP/1.1\r\nFoo: so the victim's real GET /home HTTP/1.1 becomes GET /?x="><script>...Foo: GET /home HTTP/1.1....
  • The back-end responds with an XSS-containing response to a garbled request that the front-end's caching layer associates with the victim's clean URL (/home).
  • The CDN caches this poisoned response under the legitimate cache key. Every subsequent visitor to /home receives the attacker's stored XSS until the cache entry expires or is purged.

Impact Escalation Table

Smuggling type+ Cache poisoning targetCombined impact
CL.TE desyncPopular landing pageStored XSS delivered to all site visitors
TE.CL desyncJavaScript resource URLSupply-chain-style compromise: poisoned JS runs on every page that includes it
H2.CL desyncAPI response cached as JSONData injection into cached API responses
CL.0Static asset served to many usersDefacement or malicious redirect at CDN scale

The reason this combination is so dangerous is the persistence and blast radius: a successful smuggling attack that poisons a CDN cache doesn't require the attacker to be present when victims are affected. The cache does the distribution. A single successful poison-and-cache operation can compromise thousands of users for the duration of the cache TTL.

Cache-Layer Defences

Beyond the standard smuggling defences (normalise length headers, use HTTP/2 end-to-end), additional cache-specific hardening:

  • Strict cache-key segmentation — include headers like Cookie, Authorization, and request method in the cache key for any authenticated or user-specific response, so a poisoned response cached under one key is not served to unauthenticated or different-method requests.
  • Short TTLs on dynamic content — limit the window during which a poisoned entry persists.
  • Cache key validation — some CDNs allow custom cache-key rules; exclude parameters that an attacker could inject via smuggling from the cache key, or require exact-match on path.
  • Purge on anomaly detection — if a WAF or IDS detects a desync probe, immediately purge cache entries that may have been poisoned.
  • Response validation — some reverse proxies can be configured to validate the outgoing response's Content-Type against the URL being cached, rejecting an HTML response for a .js URL.

Conclusion and Takeaways

HTTP Request Smuggling is a uniquely architectural vulnerability: it lives not in any single server but in the seam between two servers that disagree about where a request ends. That makes it both subtle — invisible in a single request/response pair, detected mainly by timing — and devastating, because its victims are arbitrary strangers sharing a connection. The core mechanism never changes across CL.TE, TE.CL, TE.TE, and HTTP/2-downgrade variants: craft a request whose boundary the front-end and back-end compute differently, and the leftover bytes become a smuggled prefix grafted onto the next user's traffic. From there flow the high-severity outcomes — capturing victims' session cookies, bypassing front-end WAFs and auth, and poisoning shared caches to compromise users en masse.

For testers, the discipline is timing-based detection (the hanging-request probe), careful self-targeted confirmation, and explicit demonstration of third-party impact — all best driven through Burp's HTTP Request Smuggler to avoid harming real users. For defenders, the remedy follows directly from the cause: eliminate the disagreement. Run HTTP/2 end-to-end to remove header-based ambiguity, or if you must downgrade, normalise ruthlessly — reject conflicting and obfuscated length headers at the front-end, align parsing across the chain, avoid blind back-end connection reuse, and never trust the front-end as your only security boundary. Make every hop agree, byte for byte, on where each request ends, and the entire smuggling class evaporates.