Lesson 17 of 19 · 22m
HTTP Request Smuggling: Two Parsers, One Socket
Front-end and back-end disagree about where a request ends — CL.TE and TE.CL desync, obfuscated Transfer-Encoding, H2-to-H1 downgrades, and the poisoned queue downstream.
Your CDN or nginx reads the request and decides where it ends. Your app server reads the same bytes and decides differently. The leftover — bytes the front-end thought were part of request N — gets glued onto request N+1, which belongs to somebody else. That somebody's cookies are now inside a request you sent. That's HTTP request smuggling, and it requires no vulnerability in your application code at all.
CL.TE and TE.CL
HTTP/1.1 offers two ways to find a message boundary: Content-Length and Transfer-Encoding: chunked. The spec (RFC 9112) says TE wins and a message with both should be rejected. Reality: front-end and back-end may honor different ones.
CL.TE — the front-end honors Content-Length, the back-end honors Transfer-Encoding:
POST / HTTP/1.1
Host: app.example.com
Content-Length: 13
Transfer-Encoding: chunked
0
SMUGGLEDThe front-end reads 13 bytes (`0
SMUGGLED) and forwards. The back-end reads chunked, hits the 0terminator, and leavesSMUGGLEDsitting in the socket — where it becomes the prefix of the next request. TE.CL inverts the same idea: front-end chunks, back-end readsContent-Length, and a smuggled full request (GET /admin HTTP/1.1 ...`) rides in the leftover.
TE.TE needs no disagreement about which header wins — just disagreement about parsing. Whitespace (Transfer-Encoding : chunked), garbage values (xchunked, identity), duplicate TE headers, casing tricks, exotic line endings. Different versions of gunicorn, uvicorn, and Node's llhttp have parsed these differently. If the front-end accepts the obfuscation and the back-end doesn't, you have a desync.
The modern path: HTTP/2 downgrades
The configuration everyone runs is H2 to the client, HTTP/1.1 to the app. H2 is binary-framed: a content-length field that's just an integer in a frame, which need not match what gets serialized into the forwarded h1 request. H2.CL and H2.TE desyncs need no h1 parser bug — the translation itself is the bug surface. Hop-by-hop headers join in: Connection: x-custom lists headers to strip, and a proxy that forwards it literally lets clients edit what the back-end sees.
There's a subtler variant worth knowing: response-queue desync. Even when the request boundary survives, a front-end that pipelines requests over one back-end connection can misalign responses — request A's answer goes to request B's client. Same lesson: the pairing of bytes to requests is the invariant, and the pair of parsers is what maintains or breaks it.
What it reaches
Queue poisoning is the headline: the victim's next request gets your smuggled prefix, so their credentials land inside your POST. Front-end ACL bypass is quieter: smuggle /admin past an edge rule that blocks it, straight into the back-end's routing. Response-cache poisoning and reflected-XSS amplification come free once you control what other users receive.
James Kettle's "HTTP Desync Attacks" research (PortSwigger, August 2019, presented at DEF CON 27 and Black Hat) converted this whole class into payouts across most major CDN and proxy stacks — and the bugs kept coming. HAProxy had CVE-2021-40346 (an integer overflow in Transfer-Encoding parsing). Apache httpd had CVE-2023-25690 (mod_proxy smuggling, fixed in 2.4.56). llhttp and undici have had their own advisories. This layer stays productive because every pair of parsers is a fresh disagreement to test.
Your application can't fix it — the disagreement lives between the components in front of it. What you control is the pair: keep front-end to back-end on HTTP/2 where supported so nothing gets downgraded, patch the proxies and app servers on the advisory cadence, reject ambiguous requests at the edge (both CL and TE is an automatic 400), normalize before forwarding, and probe it for real — Burp's HTTP Request Smuggler and Turbo Intruder run CL.TE/TE.CL/TE.TE scans that find desyncs your test suite never will.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Building a Production REST API With Node.js and Express
Build a REST API in Node.js and Express the way production systems need: input validation, JWT auth, refresh token rotation, status codes, rate limiting, idempotency keys, and centralized error handling.
Node.js Fixed 16 Flaws in One Release. Most of Them Live in HTTP/2 and TLS.
The November 11 Node.js security releases fix 16 CVEs across the 26, 24 and 22 lines, seven of them rated high. Nearly all sit in HTTP/2 and TLS, where a remote client can crash a server, leak memory, or get past per-host client-certificate checks.
Next.js Shipped Seven Advisories and Six of Them Are the Cache
The November 2026 Next.js security release patches seven issues, and six live in the new Cache Components layer, the feature meant to make your app faster by remembering more. Three hit self-hosted next start specifically: the ones Vercel's own platform quietly absorbs.
Forum Archaeology: Nulled vBulletin, XenForo, and the Missing Footer
I could spot a nulled forum in about four seconds, and it never stopped being funny. Here's why the copyright line gives it away, what a measured 97% of nulled add-ons actually contain, and why MyBB quietly became the smart choice for everyone who wanted the look without the paper trail.