Summary
Tornado may mishandle duplicate Transfer-Encoding: chunked headers by treating a request as having no body while parsing the chunked data as a separate request. When Tornado is deployed behind a proxy with different request parsing behavior, an attacker may desynchronize connections and perform HTTP request smuggling.
Affected context
This vulnerability can arise in Tornado deployments that process HTTP requests behind reverse proxies, load balancers, gateways, or other intermediaries. Risk depends on whether the intermediary and Tornado interpret duplicate Transfer-Encoding headers differently, allowing request boundaries to be understood inconsistently across the request path.
Exploit preconditions
- Attack surface: HTTP services exposed through a proxy or other request intermediary
- Required access: Ability to send crafted HTTP requests to the affected service
- Trigger point: Processing of duplicate
Transfer-Encoding: chunkedheaders - Why exploitation is possible: Tornado may disregard the duplicate transfer-encoding information while an upstream intermediary interprets the chunked body, causing inconsistent request boundaries and connection desynchronization
Why this happens
The underlying bug is inconsistent HTTP message framing when duplicate Transfer-Encoding: chunked headers are received. Tornado can interpret the request as lacking a message body and then process the chunked content as a subsequent request, while a proxy may apply different framing rules. This maps to CWE-444: Inconsistent Interpretation of HTTP Requests, in which components along the same request path disagree about where one request ends and another begins.
Potential impact
- An attacker could bypass access controls applied by an intermediary
- Sensitive requests or responses may be misrouted or exposed
- Shared caches could be poisoned
- Backend connections may become desynchronized
- Subsequent users' requests could be affected or exposed
General mitigation guidance
Mitigation generally focuses on ensuring consistent, strict HTTP message-framing behavior across every intermediary and backend.
Common defensive patterns include:
- Rejecting ambiguous or duplicate transfer-encoding headers at the edge
- Enforcing a single, well-defined request framing policy across proxies and application servers
- Normalizing or rejecting malformed requests before forwarding them
- Avoiding reliance on conflicting interpretations between front-end and back-end components
- Limiting connection reuse when request framing cannot be validated safely
- Applying least-privilege access controls so a desynchronized request has limited impact
How teams detect issues like this
Organizations can identify request smuggling risks through:
- Static and configuration analysis for inconsistent proxy and application-server framing rules
- Code review of HTTP parsing, header normalization, and connection reuse logic
- Integration tests that compare intermediary and backend interpretations of ambiguous requests
- Network monitoring for duplicate transfer-encoding headers, unusual chunk boundaries, and backend connection anomalies
- Policy enforcement that rejects ambiguous HTTP framing at ingress
Automated security testing tools may help identify discrepancies, but results should be validated against the complete deployed request path.

