Summary
Eclipse Jetty's HTTP/1.1 parser mishandles chunk extensions, allowing specially crafted Transfer-Encoding: chunked requests with malformed quoted extensions to be parsed inconsistently.
An attacker who can send HTTP requests to a Jetty-based service may smuggle a hidden request through intermediary components, potentially bypassing security controls and interacting with backend services in unexpected ways.
Affected context
This vulnerability appears in Jetty deployments that:
- Accept HTTP/1.1 requests with
Transfer-Encoding: chunked - Sit behind or alongside other HTTP components (proxies, load balancers, WAFs, API gateways) that may parse requests differently
- Do not normalize or reject malformed chunk extensions and quoted strings at the edge
The risk is highest where Jetty's interpretation of chunked messages differs from that of intermediary devices, creating parsing ambiguities an attacker can exploit.
Exploit preconditions
- Attack surface: Network-exposed HTTP/1.1 endpoints using Jetty as an application server or backend.
- Required access: Ability to send crafted HTTP requests to the target (no prior authentication strictly required, depending on deployment).
- Trigger point: Parsing of
Transfer-Encoding: chunkedmessages that include chunk extensions with unterminated or malformed quoted strings. - Why exploitation is possible: Jetty terminates chunk extension parsing at
\r\neven inside a quoted string, instead of treating the malformed syntax as invalid. If an upstream proxy or load balancer interprets the same sequence differently, the attacker can position a "smuggled" second request within what looks like a single request to the intermediary.
Why this happens
The root cause is a parsing inconsistency in the HTTP/1.1 chunked transfer-encoding implementation for chunk extensions.
Instead of strictly enforcing the HTTP grammar for quoted strings in chunk extensions (e.g., requiring properly closed quotes and rejecting invalid sequences), Jetty terminates parsing when it encounters a CRLF (\r\n) inside a still-open quoted string. This leads to a state where Jetty considers the chunked message valid and continues processing the body, while other components might reject or differently interpret the same bytes.
This behavior aligns with CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request Smuggling'), where differing parsers along the request path disagree on request boundaries and semantics, enabling attackers to craft overlapping or hidden requests between layers.
Potential impact
- Smuggling of a hidden HTTP request through an intermediary that only sees a single benign-looking request
- Bypassing security controls such as WAF rules, rate limiting, or authentication enforced at the front proxy
- Interference with other users' requests, including response desynchronization and potential session fixation or hijacking scenarios
- Unauthorized access to internal endpoints or admin/debug paths not intended to be directly exposed
- Abuse of backend resources for actions that logging or monitoring systems may partially miss or misattribute
General mitigation guidance
Effective mitigation focuses on eliminating parsing ambiguities and tightening HTTP message handling:
- Enforce strict HTTP/1.1 compliance for chunked transfer-encoding and chunk extensions, including mandatory closing of quoted strings and rejection of malformed syntax.
- Normalize or reject non-conforming chunk extensions at the earliest possible boundary (e.g., edge proxy or gateway), reducing the opportunity for downstream parsers to disagree.
- Configure front proxies, load balancers, and gateways to align HTTP parsing behavior with backend servers (e.g., consistent handling of chunked encoding, invalid headers, and extensions).
- Consider disabling or limiting support for chunk extensions in environments where they are not required, favoring simpler message patterns that reduce parser complexity.
- Apply defense-in-depth controls such as authentication at the first hop, strict routing rules, and least-privilege backend endpoints so that even smuggled requests encounter strong authorization checks.
How teams detect issues like this
Detection typically combines configuration review, code analysis, and runtime monitoring:
- Static analysis / code review: Look for custom or non-standard HTTP parsing logic, especially around
Transfer-Encoding: chunkedand chunk extensions. Verify that quoted strings are fully validated and malformed input is rejected rather than tolerated. - Security testing: Use HTTP request smuggling test suites and fuzzers that exercise "funky chunks" patterns, malformed quoted strings, and inconsistent CRLF placement to observe differences between proxy and backend interpretation.
- Log correlation: Monitor for unusual or unexplained backend requests that are not paired with corresponding entries at the edge proxy or WAF, which may indicate successful request smuggling.
- Policy enforcement: Configure gateways or API management layers with policies that disallow or normalize chunk extensions and reject ambiguous or malformed transfer-encoding usage.

