What Is HTTP Request Smuggling? How to Prevent It
Request smuggling is sneaking a hidden request through when the front end and back end interpret the request boundary differently. A table of CL.TE, TE.CL and HTTP/2 types, cache poisoning and session theft impact, consistent parsing defense and evidence based scanning with KAOS.
Quick answer: HTTP request smuggling is when the server in front (front end, proxy or CDN) and the server behind interpret where a request ends differently, letting the attacker sneak a hidden request through. The attacker uses the Content Length and Transfer Encoding headers in a conflicting way so the end of a request is ambiguous. The front end thinks the request ends in one place while the back end thinks it ends in another, so the smuggled part is added to the next user's request. The result can be cache poisoning, session hijacking, bypassing security checks and capturing other users' responses. The root fix is to make the front end and back end use the same strict parsing rules and to reject ambiguous requests.
In modern web architectures a request often has a CDN, load balancer or reverse proxy in front of it. These layers must interpret the same HTTP request the same way. The smallest interpretation difference between them opens the door to request smuggling. This article explains how request smuggling happens, its types and the correct defense.
How request smuggling works
HTTP indicates where a request body ends in two ways: the Content Length header states the body length, and Transfer Encoding chunked means the body arrives in parts and ends with a special terminator. The problem appears when a request contains both headers or sends them malformed.
The front end server relies on one header, the back end server relies on the other. Because of this mismatch, part of a request is seen by the back end as a separate new request. This smuggled part is prepended to the next legitimate user's request.
Types of request smuggling
| Type | Front end and back end | Short description |
|---|---|---|
| CL.TE | Front end Content Length, back end Transfer Encoding | Front end reads length, back end reads chunked |
| TE.CL | Front end Transfer Encoding, back end Content Length | The reverse interpretation difference |
| TE.TE | Both Transfer Encoding | One ignores the malformed header |
| H2.CL / H2.TE | HTTP/2 to HTTP/1 translation | Mismatch during protocol downgrade |
Even on systems using HTTP/2, this class of flaw can return when the request is translated to HTTP/1 for the back end. So protocol translation is a critical point.
Real impact
Request smuggling alone is not an information disclosure, it is an attack layer. With the smuggled request an attacker can:
- Cache poisoning. A malicious response is cached and served to other users. It should be evaluated together with web cache poisoning logic.
- Session and identity theft. The smuggled request mixes into another user's request and can capture session data, which can lead to account takeover.
- Bypassing security controls. The front end WAF or access control is bypassed because it does not see the smuggled request.
- Reaching internal endpoints. Management endpoints blocked by the front end can be reached from the back end, and the impact grows when combined with SSRF.
Why it is hard to detect
Request smuggling relies on timing and server behavior, so it is easily missed by simple scanners. The same request works in one environment and fails in another configuration. To prove a flaw is real, you must show in a controlled way that the request actually splits in two at the back end. Because the false positive risk is high, an unverified smuggling claim should not be taken seriously.
The correct defense
1. Same parsing at front end and back end
All servers in the chain must interpret HTTP headers with the same strict rules. Requests that carry both Content Length and Transfer Encoding must be rejected.
2. Reject ambiguous requests
Requests with malformed or conflicting length headers must be rejected before processing. Ambiguity is insecurity.
3. End to end HTTP/2 and connection isolation
Where possible, HTTP/2 should be carried to the back end too, minimizing protocol downgrade. Connection reuse must be isolated per client.
4. Up to date proxy and CDN
Request smuggling often stems from parsing bugs in specific proxy and server versions. Front end components must be kept up to date.
Request smuggling scanning with KAOS
DSET's local AI security engine KAOS tests request smuggling based on timing and response differences with an evidence first approach. It tries different CL and TE combinations, observes whether the request actually splits at the back end and reports only endpoints that are genuinely desynchronized. It distinguishes whether a timing based signal comes from network latency or a real desync, so it provides a verified finding without false positives. Because this class of flaw can risk the production environment, testing is always done in a controlled and authorized way.
Frequently asked questions
I use HTTP/2, does request smuggling affect me? Yes, it can. If you do not use end to end HTTP/2 and it is translated to HTTP/1 for the back end, mismatches such as H2.CL and H2.TE can occur during that translation. Every point with protocol translation is at risk.
Does a WAF stop request smuggling? Not on its own. On the contrary, one common goal of smuggling is to bypass the front end WAF, because the smuggled request is not seen by the WAF. The defense is consistent parsing and rejecting ambiguous requests.
A scanner told me it found smuggling, should I panic? It should be verified first. Timing based signals can be confused with network latency. No firm conclusion should be drawn until it is shown in a controlled way that the request splits at the back end.
Sources
- PortSwigger Web Security Academy, HTTP request smuggling: https://portswigger.net/web-security/request-smuggling
- OWASP, HTTP Request Smuggling: https://owasp.org
To test your web application against request smuggling and OWASP Top 10 flaws with a working proof, contact DSET. We provide penetration testing and secure code review from our Ankara Hacettepe Teknokent laboratory.
Kimliğinizi doğrulayın
Yetkilendirilmiş erişim alanı. Tüm giriş denemeleri kayıt altına alınır.