← CodeClarityLab Home
Browse by Category
+ added · updated 7d
← Back to glossary

HTTP Request Smuggling

security CWE-444 OWASP A5:2021 CVSS 9.8 Advanced
debt(d7/e7/b5/t7)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). The detection_hints list specialist tools (burpsuite, owasp-zap, portswigger-smuggler) that can catch it, but these require deliberate, targeted security testing — they are not default linters or compile-time checks. The vulnerability is silent in normal operation and only surfaces under adversarial probing or careful security audits, placing it closer to d7 than d5. Automated scanning is possible but only if someone thinks to run smuggling-specific tooling.

e7 Effort Remediation debt — work required to fix once spotted

Closest to 'cross-cutting refactor across the codebase' (e7). The quick_fix says to use HTTP/2 end-to-end between load balancer and PHP backend, which eliminates the ambiguity. However, this is not a single-line patch — it requires infrastructure changes (reconfiguring or upgrading the load balancer, ensuring the backend supports HTTP/2, verifying all intermediate proxies handle it consistently), touching multiple layers of the stack. This is a cross-cutting infrastructure change rather than a simple code fix.

b5 Burden Structural debt — long-term weight of choosing wrong

Closest to 'persistent productivity tax' (b5). The vulnerability arises from the interaction between frontend proxy and backend server across the web/api contexts. Any change to the proxy layer, CDN configuration, or HTTP parsing libraries must consider smuggling implications. This imposes an ongoing awareness tax on teams managing the proxy/backend boundary, but it does not define the entire system's shape — teams not touching the HTTP stack are largely unaffected.

t7 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'serious trap' (t7). The misconception field explicitly states that developers believe smuggling only affects high-traffic sites with complex proxy setups, but in reality any application behind a reverse proxy or CDN using HTTP/1.1 with differing Content-Length/Transfer-Encoding handling is vulnerable. This contradicts the intuitive mental model of 'I'm just a small app with a simple proxy,' and the attack mechanism (exploiting parsing disagreements between two compliant-but-inconsistent servers) is non-obvious and contradicts how developers normally think about HTTP request parsing.

About DEBT scoring →

Also Known As

HTTP request smuggling desync attack CL.TE attack

TL;DR

Desynchronising front-end and back-end HTTP parsing via conflicting Content-Length and Transfer-Encoding headers to poison request queues.

Explanation

HTTP Request Smuggling exploits the ambiguity between how a front-end proxy and a back-end server interpret the boundary of an HTTP request. Conflicting Content-Length and Transfer-Encoding: chunked headers can cause an attacker-controlled prefix to be prepended to the next legitimate user's request. Consequences include cache poisoning, session hijacking, and bypassing security controls. Mitigations: use HTTP/2 end-to-end, configure servers to reject ambiguous requests, and ensure front-end/back-end use identical HTTP parsing libraries.

Common Misconception

HTTP smuggling only affects high-traffic sites with complex proxy setups. Any application behind a reverse proxy or CDN where the frontend and backend parse HTTP/1.1 differently (Content-Length vs Transfer-Encoding) can be vulnerable.

Why It Matters

HTTP request smuggling exploits disagreements between a front-end proxy and back-end server on how to parse request boundaries — allowing attackers to prepend their data to another user's request.

Common Mistakes

  • Front-end and back-end using different HTTP parsing implementations with differing Content-Length/Transfer-Encoding handling.
  • Not upgrading to HTTP/2 end-to-end — HTTP/2 eliminates the ambiguity that makes smuggling possible.
  • Load balancers that silently ignore malformed Transfer-Encoding headers instead of rejecting them.
  • Not testing for smuggling with tools like smuggler.py before deploying a new proxy layer.

Code Examples

✗ Vulnerable
// CL.TE smuggling — front-end uses Content-Length, back-end uses Transfer-Encoding:
POST / HTTP/1.1
Content-Length: 13
Transfer-Encoding: chunked

0

GET /admin   <- Smuggled request prefix, prepended to next user's request
✓ Fixed
# HTTP Request Smuggling — frontend and backend disagree on body length
# Attacker sends ambiguous CL + TE headers to inject a second request

# Prevention:
# 1. Use HTTP/2 end-to-end (no CL/TE ambiguity)

# 2. Normalise at the load balancer — reject requests with both headers:
# nginx: reject if both Content-Length and Transfer-Encoding present
if ($http_transfer_encoding && $content_length) { return 400; }

# 3. Keep nginx/HAProxy up-to-date — both have fixed desync bugs

# 4. PHP-FPM is not directly internet-facing — nginx acts as gatekeeper
#    Ensure the gateway validates request framing

# Test: PortSwigger HTTP Request Smuggler (Burp Suite extension)

Added 15 Mar 2026
Edited 22 Mar 2026
Views 17
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 0 pings F 1 ping S 0 pings S 1 ping M 0 pings T 0 pings W 0 pings T 0 pings F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 0 pings F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 2 pings S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F
No pings yet today
No pings yesterday
Amazonbot 7 Google 2 Perplexity 2 Majestic 1 Ahrefs 1 Claude 1
crawler 13 crawler_json 1
DEV INTEL Tools & Severity
🟠 High ⚙ Fix effort: High
⚡ Quick Fix
Use HTTP/2 between your load balancer and PHP backend — it eliminates the Content-Length / Transfer-Encoding ambiguity that HTTP request smuggling exploits
📦 Applies To
any web api
🔗 Prerequisites
🔍 Detection Hints
HTTP/1.1 between load balancer and PHP with inconsistent Content-Length handling; frontend-backend HTTP version mismatch
Auto-detectable: ✓ Yes burpsuite owasp-zap portswigger-smuggler
⚠ Related Problems
🤖 AI Agent
Confidence: Medium False Positives: Medium ✗ Manual fix Fix: High Context: File
CWE-444

✓ schema.org compliant