Advance Topics
HTTP REQUEST SMUGGLING
POST / HTTP/1.1
Host: target.com
Content-Length: 10
Transfer-Encoding: chunked
0
GPOST
POST / HTTP/1.1
Host: target.com
Content-Length: 3
Transfer-Encoding: chunked
8
GPOST123
0
POST / HTTP/1.1
Host: YOUR-LAB-ID.web-security-academy.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 4
Transfer-Encoding: chunked
Transfer-Encoding: cow
5c
GPOST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 15
x=1
0
๐ง Quick Summary — What HTTP Request Smuggling Is
HTTP request smuggling is a web security vulnerability that exploits differences in how front-end (proxy/WAF) and back-end servers parse HTTP requests — especially when Content-Length and Transfer-Encoding headers coexist.
If these two servers don’t agree on where one request ends and the next begins, an attacker can sneak (“smuggle”) a hidden HTTP request inside the next request.
๐ Why It Happens (Technical Cause)
The core issue arises because HTTP/1.1 allows two different ways to determine the end of the body:
-
Content-Length: declares exact bytes. -
Transfer-Encoding: chunked: sends chunks until a zero-size chunk.
If one server trusts one header and another trusts the other, they desynchronize — creating ambiguity.
๐งช Popular Attack Types
-
CL.TE – Front-end uses
Content-Length, back-end usesTransfer-Encoding. -
TE.CL – Front-end uses
Transfer-Encoding, back-end usesContent-Length. -
TE.TE – Both use
Transfer-Encoding, but one server ignores/handles differently due to duplicate or malformed headers.
๐จ Real-World Impacts
HTTP request smuggling can enable:
-
Session hijacking
-
Bypassing security filters (WAF/proxies)
-
Cache poisoning
-
Unauthorized admin access
-
Account takeovers
(Critical severity in most cases)
๐ก️ How To Defend Against It
General prevention strategies include:
-
Ensure consistent request handling across servers.
-
Use HTTP/2 end-to-end (reduces ambiguity).
-
Reject malformed or ambiguous requests at the edge.
-
Disable unnecessary legacy parsing features if possible.
Comments
Post a Comment