Sceawere
Vulnerability Detail
CVE-2026-84382UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
HTTPX2 Decompression Memory Exhaustion Vulnerability
Vulnerability Metadata
- Severity
- High
- Score / CVSS
- 7.5
- Creation Date
- 14h ago
- Vendor
- pydantic
- Product
- httpx2
- Attack Type
- CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack Complexity
- LOW
Narrative and Response
Description
HTTPX2 is a next generation HTTP client for Python. Prior to 2.12.0, the HTTPX2 content decoders in src/httpx2/httpx2/_decoders.py fully inflate each gzip, deflate, br, or zstd network chunk before iter_bytes() or aiter_bytes() yields bounded pieces to the application. A 64 KiB compressed chunk can expand to approximately 64 MiB in one intermediate allocation, so an attacker-controlled or compromised server can cause severe memory pressure or out-of-memory process termination even when the application streams the response. This issue is fixed in version 2.12.0.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "7.5",
"pubDate": "2026-09-02T19:18:08.353Z",
"pubdate": "2026-09-02T19:18:08.353Z",
"executiveSummary": "HTTPX2 versions prior to 2.12.0 are susceptible to a memory exhaustion vulnerability stemming from insecure handling of compressed HTTP response bodies. This vulnerability is classified as an uncontrolled resource consumption issue that leads to denial-of-service (DoS) conditions.\nThe flaw exists within the content decoding logic where incoming network chunks are fully decompressed into memory before being yielded to the application layer. An attacker-controlled server can leverage high compression ratios to trigger significant memory spikes, potentially resulting in out-of-memory (OOM) process termination.\nThis vulnerability poses a critical risk to applications performing streaming HTTP requests, as the internal inflation process bypasses application-level stream boundaries. Exploitation does not require authentication and can be executed by any remote server capable of delivering compressed payloads to an HTTPX2-based client.\nThe impact is primarily a service disruption caused by the exhaustion of system memory, which may affect not only the HTTPX2 process but also other services running on the same host environment if resource limits are not strictly enforced.",
"technicalDetails": "The root cause of this vulnerability lies in the implementation of the content decoders located in 'src/httpx2/httpx2/_decoders.py'. In affected versions, the library utilizes an eager decompression strategy. When processing compressed streams (gzip, deflate, br, or zstd), the library inflates the entire network chunk in a single operation before providing the resulting data to the application via 'iter_bytes()' or 'aiter_bytes()'.\nBecause compression algorithms like gzip or Brotli can achieve extremely high compression ratios (often exceeding 1000:1), a small, malicious compressed payload can expand significantly once decoded. Specifically, a 64 KiB network chunk can be manipulated to expand into roughly 64 MiB of uncompressed data within a single intermediate memory allocation. This discrepancy between the compressed network input size and the resulting uncompressed memory footprint creates an amplification vector.\nThe attack flow proceeds as follows: 1. A client initiates an HTTP request to an attacker-controlled server. 2. The server responds with a payload utilizing a high-compression ratio. 3. The HTTPX2 library receives the network chunks and passes them to the internal decoder. 4. The decoder performs a full inflation of the chunk into an internal buffer. 5. Due to the high compression ratio, the memory allocated for the decompressed chunk consumes significantly more system memory than the incoming network traffic would suggest. 6. By sending a sequence of such chunks, the attacker forces the application process to consume excessive RAM. 7. Eventually, this leads to an OOM condition, triggering a process crash or system-wide instability.\nThe vulnerability is present across all transport protocols supported by HTTPX2 that utilize these decoders. It affects all versions prior to 2.12.0. There are no specific authentication or privilege requirements for exploitation, as the vulnerability is triggered during the standard response parsing phase of an HTTP request. This makes any application using HTTPX2 to interact with external, untrusted sources inherently vulnerable to memory exhaustion attacks if those sources return malicious compressed payloads."
}