Skip to content
Back to Blog
·10 min read·technology

HTTP Request Smuggling: The Front-End Back-End Desync Attack

How CL.TE, TE.CL, and TE.TE desyncs between front-end proxies and back-end servers enable HTTP request smuggling, cache poisoning, and session hijacking.

BR

Bachao.AI Research Team

Cybersecurity Research

Scan Your Attack Surface

Security exposure this creates

Unpatched vulnerabilities in your tech stack are the #1 entry point for breaches targeting Indian businesses. Here's what to watch.

HTTP request smuggling is an attack where a front-end proxy (load balancer, CDN, reverse proxy) and a back-end server disagree about where one HTTP request ends and the next begins. That disagreement — a "desync" — lets an attacker craft a single request that the front end reads as one request but the back end reads as two, smuggling a hidden second request into another user's connection. The result: cache poisoning, session hijacking, credential capture, and silent bypass of front-end access controls. This guide covers the CL.TE, TE.CL, and TE.TE desync mechanics, how to discover them safely, real-world impact, and the defences that actually close the gap.

Why This Attack Still Works in 2026

Most Indian web stacks are not a single server — they're a chain: CDN, WAF, load balancer, application server, sometimes an internal proxy in front of a microservice. Each hop in that chain runs its own HTTP parser, often from a different vendor, often a different version. HTTP/1.1 was never designed with a single unambiguous way to signal request length, and that ambiguity is exactly what request smuggling exploits.

🛡️
SECURITY
Request smuggling is a chain-of-custody bug — the vulnerability doesn't live in any one server, it lives in the disagreement between two servers that are individually behaving "correctly" per their own parser's rules.

The Root Cause: Two Ways to Say "This Is How Long I Am"

HTTP/1.1 gives a request two independent headers to declare its body length:

    1. Content-Length — an exact byte count for the body.
    2. Transfer-Encoding: chunked — the body is sent in chunks, each prefixed with its own length, terminated by a zero-length chunk.
A well-formed request should only use one. But nothing in the HTTP/1.1 spec strictly forbids a request from containing both, or from containing a Transfer-Encoding header value that's subtly malformed (extra whitespace, unusual casing, a duplicate header). When both are present, RFC 7230 says Transfer-Encoding takes priority and Content-Length should be ignored — but not every parser implements that rule, and that's the seam attackers exploit.

The Three Desync Variants

CL.TE — the front end uses Content-Length to frame the request, the back end uses Transfer-Encoding. The front end forwards what it thinks is a complete request, but the back end, reading chunked encoding, treats the leftover bytes after the terminating chunk as the start of the next request on that connection — a request the attacker fully controls.

TE.CL — the reverse: the front end honours Transfer-Encoding, the back end honours Content-Length. The front end forwards the full chunked body, but the back end stops reading at the declared Content-Length and treats the remaining chunked data as a smuggled prefix to the next request.

TE.TE — both servers nominally support Transfer-Encoding, but one of them can be tricked into ignoring it via header obfuscation (a stray space, a non-standard character, or a duplicated Transfer-Encoding header). Whichever server disregards it falls back to Content-Length, recreating a CL.TE or TE.CL condition through obfuscation rather than absence.

graph TD A[Attacker sends ambiguous request] --> B[Front end parses length] B --> C[Back end parses length] C --> D{Do lengths agree} D -->|No| E[Desync occurs] D -->|Yes| F[Request handled normally] E --> G[Smuggled request queued] G --> H[Next user request merges] H --> I[Cache poisoned or session hijacked] style A fill:#5f1e1e,stroke:#EF4444,color:#e2e8f0 style E fill:#5f1e1e,stroke:#EF4444,color:#e2e8f0 style I fill:#5f1e1e,stroke:#EF4444,color:#e2e8f0 style F fill:#1e3d2f,stroke:#10B981,color:#e2e8f0 style B fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style C fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style D fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style G fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style H fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0

Know your vulnerabilities before attackers do

Run a free VAPT scan — takes 5 minutes, no signup required.

Book Your Free Scan

Discovery Methodology: Finding Desyncs Without Breaking Production

Discovery has to be careful — a badly timed smuggling probe on a shared connection pool can corrupt a real user's session in production. The standard methodology, popularised by PortSwigger's research on HTTP desync attacks, uses timing-based detection before any exploitation attempt:

  1. Send a CL.TE probe. Craft a request with both headers where the Content-Length is short and the Transfer-Encoding body is left unterminated. If the back end is TE-based, it waits for more chunked data that never arrives — a measurable response delay confirms the desync without corrupting another user's traffic.
  2. Send a TE.CL probe. Invert the test — a short chunked body followed by data the back end (if CL-based) will treat as part of the next request, causing a timeout on that connection specifically.
  3. Confirm with a differential response, not a live victim. Once timing suggests a desync, confirm by smuggling a request against your own second connection (a self-targeted probe) rather than an unpredictable live user, and observe the response prefix left behind.
  4. Fuzz header obfuscation for TE.TE. Test variants: Transfer-Encoding: chunked, Transfer-Encoding : chunked (trailing space before colon), duplicate Transfer-Encoding headers, and non-standard casing, to find which one a given server in the chain silently ignores.
  5. Test HTTP/2 downgrade paths separately. Many front ends terminate HTTP/2 from the browser and re-issue HTTP/1.1 to the back end. The downgrade step itself can introduce a request-smuggling surface even if no client ever speaks HTTP/1.1 directly — this is now one of the most common real-world smuggling vectors in CDN-fronted architectures.
⚠️
WARNING
Discovery techniques described here are for authorised testing only, against assets you own or have explicit written permission to test. Testing infrastructure without authorisation is an offence under Section 43 and Section 66 of India's IT Act, 2000.

Impact: What a Successful Desync Actually Buys an Attacker

Request smuggling is rarely the end goal — it's a primitive that enables several higher-impact attacks:

    1. Cache poisoning. If the front end is a caching proxy or CDN, a smuggled request can trick it into caching a malicious response against a legitimate URL, serving that poisoned response to every subsequent visitor until the cache expires.
    2. Session hijacking and credential capture. A smuggled request prefix gets prepended to the next unrelated user's request on the shared back-end connection. If that next request is theirs, the attacker's smuggled prefix can capture their session cookie, auth header, or form submission in the response that comes back.
    3. Bypassing front-end access controls. WAFs, rate limiters, and auth checks that live only on the front end never see the smuggled portion of the request — it arrives at the back end as if it came from inside the trusted perimeter, bypassing rules the front end was supposed to enforce.
    4. Request queue poisoning. On connection-reuse architectures, a single successful smuggle can corrupt the request queue for every subsequent request on that TCP connection until it's torn down, affecting multiple unrelated users in sequence.
CWE-444Official weakness classification for HTTP request/response smuggling (MITRE CWE)

The DPDP Act 2023 sets a substantial penalty ceiling for failure to safeguard personal data, and a smuggled request that exposes session cookies or user data can trigger exactly that liability — see MeitY for the full penalty schedule.

CL.TE vs TE.CL: A Quick Comparison

AspectCL.TETE.CLTE.TE
Front end trustsContent-LengthTransfer-EncodingEither, depending on obfuscation
Back end trustsTransfer-EncodingContent-LengthFalls back to CL or TE if TE header is malformed
Detection signalBack end hangs waiting for chunk dataFront-end connection times outDepends on which obfuscation variant succeeds
Common inOlder reverse proxies paired with modern app serversCDNs that prioritise chunked streamingChains with mismatched HTTP libraries
FixNormalise or reject dual-header requestsNormalise or reject dual-header requestsStrict RFC 7230 header parsing on all hops
pie showData title Illustrative Desync Variant Distribution "CL.TE" : 45 "TE.CL" : 30 "TE.TE" : 20 "Other H2 downgrade" : 5

Defence: Closing the Desync Gap

The permanent fix is architectural, not a single patch:

  1. Use HTTP/2 end-to-end wherever possible. HTTP/2 frames requests with explicit length-prefixed binary framing — there is no Content-Length vs Transfer-Encoding ambiguity to exploit. The risk reappears only at HTTP/2-to-HTTP/1.1 downgrade points, so keeping the entire chain on HTTP/2 (or gRPC where applicable) removes the root cause rather than mitigating it.
  2. Normalise ambiguous requests at the front end. Configure the front-end proxy to reject, not silently reformat, any request carrying both Content-Length and Transfer-Encoding, or a malformed/duplicated Transfer-Encoding header. Most modern reverse proxies (recent NGINX, HAProxy, Envoy releases) support this as a strict-parsing mode — enable it explicitly, don't assume it's default.
  3. Reject conflicting headers outright rather than guessing. Per RFC 7230, a request with both headers should be treated as malformed and rejected with a 400, not "resolved" by picking one. Guessing is what creates the disagreement between hops.
  4. Disable connection reuse to untrusted or legacy back ends where consistent header handling can't be guaranteed, so a smuggled prefix can't bleed into another user's request even if a desync condition exists.
  5. Keep every hop's HTTP parser current. Desync bugs are frequently patched at the library level (web servers, proxy software, load balancer firmware) — a proxy chain running mismatched, outdated parser versions is the most common real-world root cause.
💡
TIP
If your architecture is CDN → WAF → load balancer → app server, request smuggling testing should happen on that full authorised chain, not just the app server in isolation — the desync lives in the disagreement between hops, and testing one hop alone will miss it.
🎯Key Takeaway
Request smuggling isn't a bug in any single server — it's an emergent property of a proxy chain where each hop parses HTTP length framing slightly differently. The durable fix is removing the ambiguity itself (HTTP/2 end-to-end, strict header validation, reject-don't-guess parsing) rather than patching individual exploit variants as they're discovered.

Where Bachao.AI Fits

Automated VAPT platforms like Bachao.AI, from Dhisattva AI Pvt Ltd, include desync and request-smuggling checks as part of proxy-chain testing for Indian SMB web applications, flagging CL.TE/TE.CL inconsistencies across CDN, WAF, and application-server hops. Deeper manual exploitation and chain-specific validation is typically delivered with a CERT-In empanelled partner as part of a full penetration test. You can start with a free VAPT scan to get a baseline read on your proxy chain, and browse the Bachao.AI blog for related web application security methodology. Organisations handling personal data through these stacks should also review their DPDP compliance posture, since a smuggled request that exposes session or personal data carries breach-notification obligations under the Act.

Further Reading

Frequently Asked Questions

What is HTTP request smuggling in simple terms?
It's an attack that exploits a disagreement between a front-end proxy and a back-end server over where one HTTP request ends and another begins, letting an attacker hide a second request inside the first one. That hidden request can then be processed against another user's connection.
What's the difference between CL.TE and TE.CL smuggling?
In CL.TE, the front end uses Content-Length to frame the request while the back end uses Transfer-Encoding, causing leftover bytes to be read as a new request by the back end. TE.CL is the reverse: the front end trusts Transfer-Encoding, the back end trusts Content-Length, and the mismatch happens at the back end's stopping point instead.
Does moving to HTTP/2 fully prevent request smuggling?
Running HTTP/2 end-to-end removes the ambiguity because HTTP/2 uses explicit binary length framing, but the risk returns at any point where HTTP/2 is downgraded to HTTP/1.1, which is common at CDN and load-balancer boundaries. The chain has to be HTTP/2 all the way through, not just at the client edge.
Can request smuggling bypass a WAF?
Yes. If the WAF sits on the front end and inspects only what it believes is the complete request, the smuggled portion never gets evaluated by it and arrives at the back end as if it came from a trusted, already-inspected source.
How do I test for request smuggling without breaking production?
Use timing-based probes first — a request with ambiguous length headers that would cause a measurable delay if a desync exists — before attempting any request that could interact with another user's live connection, and always test only assets you're explicitly authorised to test.
Is request smuggling still relevant with modern cloud infrastructure?
Yes, and arguably more so — modern architectures chain more proxies together (CDN, WAF, load balancer, service mesh), and each additional hop with its own HTTP parser is another opportunity for two hops to disagree on request framing.
BR

Bachao.AI Research Team

Cybersecurity Research

AI-powered security research and threat intelligence from the Bachao.AI team. Covering the latest vulnerabilities, CVEs, and cybersecurity developments affecting Indian businesses.

Get cybersecurity insights for Indian SMBs

Weekly vulnerability alerts, DPDP compliance tips, and security guides. No spam — unsubscribe anytime.

We respect your privacy. Your email is never shared.

Find out if you're exposed to this class of threat

Free automated scan — risk score in under 2 hours. No credit card required.

Scan Your Attack Surface
Find your vulnerabilitiesStart free scan →