HTTP request smuggling exploits disagreements between how a frontend proxy and a backend server parse HTTP headers — allowing attackers to poison the request pipeline and hijack other users' sessions.
Anay Pandya
1,312 words
Anay Pandya
Founder of ZeriFlow · 10 years fullstack engineering · About the author
Key Takeaways
HTTP request smuggling is a vulnerability that exploits inconsistencies in how different components of a web infrastructure parse the boundaries between HTTP requests. When a frontend proxy (load balancer, CDN, reverse proxy) and a backend server disagree about where one request ends and the next begins, an attacker can 'smuggle' a partial request into the start of another user's request — hijacking their session, bypassing security controls, or achieving cache poisoning at scale.
<div class="zf-stat-callout" style="background:#0d1117;border:1px solid rgba(16,185,129,0.25);border-left:3px solid #10b981;border-radius:4px;padding:16px 20px;margin:24px 0"> <p style="margin:0 0 4px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.15em;color:#10b981;font-family:monospace">ZeriFlow Data — 12,400+ sites analyzed</p> <p style="margin:0;font-size:13px;color:#e2e8f0;line-height:1.6;font-family:monospace">In ZeriFlow's dataset of 12,400+ scanned sites, the average security score is 52/100 — with 68% failing at least one critical check in categories including TLS configuration, check your security headers, DNS authentication, and cookie handling.</p> </div>
Keep reading
Is your site actually secure?
Run a free check — 60 seconds
HTTP/1.1 provides two ways to specify the length of a request body:
RFC 7230 says if both headers are present, Transfer-Encoding takes precedence and Content-Length must be ignored. But not every server or proxy implements this rule identically — and that disagreement is the entire attack surface.
The frontend proxy uses Content-Length to determine the request boundary. The backend uses Transfer-Encoding: chunked.
Attack request:
POST / HTTP/1.1
Host: target.com
Content-Length: 13
Transfer-Encoding: chunked
0
SMUGGLEDWhat the frontend sees: A 13-byte body (`0
SMUGGLED`). It forwards the entire request to the backend.
What the backend sees: A chunked request with a zero-length chunk (end of request), followed by SMUGGLED — which it treats as the beginning of the *next* request.
Now SMUGGLED is prepended to the next request that arrives. If the next request belongs to another user, the smuggled prefix poisons it.
Reversed scenario. The frontend strips the Transfer-Encoding header or normalizes it; the backend reads Content-Length.
Attack request:
POST / HTTP/1.1
Host: target.com
Content-Length: 3
Transfer-Encoding: chunked
8
SMUGGLED
0
What the frontend sees: Chunked encoding — processes `8 SMUGGLED 0
` as the full body.
What the backend sees: Content-Length: 3, so it reads only 8
as the body. The remaining `SMUGGLED
0
` is left in the buffer and prepended to the next request.
Both servers support Transfer-Encoding, but one can be tricked into ignoring it via obfuscation:
Transfer-Encoding: xchunked
Transfer-Encoding: chunked
Transfer-Encoding: CHUNKED
Transfer-Encoding: x
Transfer-Encoding: x
Transfer-Encoding: chunkedIf the frontend processes the obfuscated header and the backend ignores it (or vice versa), you get a CL.TE or TE.CL situation by stealth.
Smuggle a request to an admin endpoint that the frontend proxy would normally block:
SMUGGLED: GET /admin HTTP/1.1
Host: backend-internal
...The backend processes it as a legitimate internal request.
Prepend a capture endpoint to the next victim's request, causing their credentials or session token to be appended to the attacker's request body:
GET /capture?x= HTTP/1.1
Host: target.com
...When the victim's request arrives, its headers (including cookies and authorization tokens) are appended to the attacker's query parameter.
Smuggle a response that gets cached against a URL the attacker chooses, affecting all future visitors.
Combine with existing reflected XSS to deliver exploits to users without a phishing link.
HTTP/2 uses a binary framing layer where each message has an explicit length field in the frame header. There is no ambiguity between Content-Length and Transfer-Encoding because the framing layer defines message boundaries.
H2.CL and H2.TE: However, if your infrastructure downgrades HTTP/2 to HTTP/1.1 at a hop boundary (e.g., the CDN speaks HTTP/2 to the client but HTTP/1.1 to the backend), smuggling vulnerabilities can re-emerge at the HTTP/1.1 segment. This is 'HTTP/2 request smuggling via desync'.
The full mitigation is: 1. Use HTTP/2 end-to-end where possible 2. Reject ambiguous requests (both CL and TE headers present) at the frontend 3. Normalize requests at the proxy layer before forwarding
Use Burp Suite's HTTP Request Smuggler extension (by James Kettle). It automates CL.TE and TE.CL probe requests and observes timing differences or response anomalies.
Manual probe for CL.TE (timing-based):
POST / HTTP/1.1
Host: target.com
Transfer-Encoding: chunked
Content-Length: 4
1
A
XIf the response is delayed (the backend is waiting for more of what it thinks is a longer body), CL.TE smuggling is likely present.
Always use a unique, non-reusable path (/uniquepath12345) and a confirming second request. Never test smuggling against live production traffic — it will affect real users.
Content-Length and Transfer-Encoding. Nginx: ignore_invalid_headers on.Transfer-Encoding and calculate a fresh Content-Length from the body.A: It is actively exploited. James Kettle's research at PortSwigger demonstrated smuggling attacks against Akamai, Amazon, and Cloudflare infrastructure. Bug bounty reports for smuggling vulnerabilities regularly pay $10,000–$40,000+.
A: WAFs themselves are often vulnerable to request smuggling, or can be bypassed by it. A WAF positioned between the client and the backend is exactly the frontend/backend pair that smuggling targets. WAFs are not an effective defense for this attack class.
A: HTTP/2 eliminates the specific CL vs. TE ambiguity because it uses binary framing. However, H2.CL and H2.TE attacks exist when infrastructure components downgrade to HTTP/1.1. Full HTTP/2 end-to-end deployment is the best available mitigation.
A: SSRF (Server-Side Request Forgery) causes the server to make requests to unintended destinations. Request smuggling manipulates how the server pipeline processes incoming requests. They are different attack classes, though both can be used to access internal services.
HTTP request smuggling exploits a fundamental ambiguity in the HTTP/1.1 specification that has persisted for decades. The attack is infrastructure-level, bypasses application-layer security controls, and can affect every user of a vulnerable system simultaneously.
The path forward is clear: adopt HTTP/2 end-to-end, harden your proxy configuration to reject ambiguous requests, and keep your infrastructure components updated and well-matched.
<!-- zf-internal-links -->
Related resources
Website Vulnerability Scanner
Run a broader website security audit across headers, TLS, DNS, cookies, SEO, and disclosure checks.
Security Headers Checker
Check CSP, HSTS, X-Frame-Options, and other response headers.
SSL Checker
Review TLS certificate, HTTPS, and transport security signals.
DMARC Checker
Validate email authentication records for domain spoofing protection.
CSP Checker
Review Content-Security-Policy coverage and common gaps.
June 24, 2026
Best Security Tools for AI Startups
Monitor your security score
Schedule recurring scans and catch regressions after deployments.