CVE-2026-84380: CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') in pydantic httpx2
Description
### Summary HTTPX2 can automatically add a `Content-Length` header to a request that already contains a caller-supplied `Transfer-Encoding` header. The resulting HTTP/1.1 request contains both framing headers, which can create an ambiguous message boundary and enable request smuggling or connection desynchronization when processed by intermediaries that disagree about which header takes precedence. ### Details When a request body has a known size, HTTPX2's content encoder returns a default `Content-Length`. `Request._prepare()` applies each default header with `setdefault()`, which only checks whether that same header is already present. It does not check whether the mutually exclusive `Transfer-Encoding` header is present. For example: ```python import httpx2 request = httpx2.Request( "POST", "http://example.com/", headers={"Transfer-Encoding": "chunked"}, content=b"test 123", ) print(request.headers) ``` The request contains both: ```text Transfer-Encoding: chunked Content-Length: 8 ``` On an HTTP/1.1 connection, the body is serialized using chunked transfer coding while both headers are sent on the wire. This violates HTTP message-framing requirements. Fixed-size byte, JSON, form, and known-length multipart bodies can reach the affected path. Streaming bodies with an explicit `Content-Length` are not affected in current HTTPX2 releases because the automatically generated `Transfer-Encoding` is already suppressed in that direction. ### Impact An attacker may be able to use the conflicting framing headers as a request-smuggling or desynchronization primitive. Exploitation requires an application to pass attacker-controlled request framing headers and associated body data to HTTPX2, use HTTP/1.1, and communicate through a proxy or origin that accepts conflicting headers and interprets them differently from another hop. Depending on the downstream infrastructure, successful exploitation could interfere with requests sharing a persistent connection, bypass front-end routing or authorization decisions, or poison responses or caches. Applications that do not forward attacker-controlled `Transfer-Encoding` headers are not directly exposed. ### Mitigation Upgrade to HTTPX2 `2.11.0` or later. Patched versions treat `Content-Length` and `Transfer-Encoding` as mutually exclusive when applying automatically generated request headers. If upgrading is not immediately possible, remove `Transfer-Encoding` and other hop-by-hop framing headers from untrusted input before constructing outbound requests. Applications acting as proxies should derive outbound framing from the body rather than forwarding inbound `Content-Length` or `Transfer-Encoding` headers.
CVSS v3.1
Score 5.6medium
Affected software
pydantic
httpx2
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
HTTPX2 automatically adds a Content-Length header to requests with a known body size using setdefault(), which does not check for the presence of a mutually exclusive Transfer-Encoding header. This results in HTTP/1.1 requests containing both Content-Length and Transfer-Encoding headers, violating HTTP message framing rules. Such conflicting headers can create ambiguous message boundaries, enabling HTTP request smuggling or connection desynchronization attacks when intermediaries disagree on which header to honor. The vulnerability affects fixed-size byte, JSON, form, and known-length multipart bodies but not streaming bodies with explicit Content-Length in current releases. Exploitation requires attacker-controlled request framing headers, HTTP/1.1 usage, and a proxy or origin that accepts and interprets conflicting headers differently. The vulnerability is addressed in HTTPX2 2.11.0, which treats Content-Length and Transfer-Encoding as mutually exclusive when generating headers.
Potential Impact
An attacker able to supply request framing headers and body data to HTTPX2 in an HTTP/1.1 context with intermediaries that interpret conflicting Content-Length and Transfer-Encoding headers differently may exploit this vulnerability to perform HTTP request smuggling or connection desynchronization. Potential impacts include interference with requests sharing a persistent connection, bypassing front-end routing or authorization, and poisoning responses or caches. Applications that do not forward attacker-controlled Transfer-Encoding headers are not directly exposed.
Mitigation Recommendations
Upgrade HTTPX2 to version 2.11.0 or later, where the issue is fixed by treating Content-Length and Transfer-Encoding headers as mutually exclusive when automatically generating request headers. If immediate upgrade is not possible, remove Transfer-Encoding and other hop-by-hop framing headers from untrusted input before constructing outbound requests. Proxy applications should derive outbound framing headers from the body rather than forwarding inbound Content-Length or Transfer-Encoding headers.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-09-01T16:27:58.130Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a986636acd9273b498ff4e3
Added to database: 09/02/2026, 18:08:54 UTC
Last enriched: 09/29/2026, 05:03:49 UTC
Last updated: 10/17/2026, 06:48:21 UTC
Views: 108
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.