Skip to content

GHSA-8xx6-hgc6-gc2m CVE-2026-84382 PYSEC-2026-3846

HTTPX2: Streaming response decompression does not bound peak memory (decompression amplification)

High PyPI
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.63%
Chance of exploitation in the next 30 days. Higher than 50.20% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-409 Improper Handling of Highly Compressed Data (Data Amplification)
Fix
2.12.0
Upgrade httpx2 to this version or later

Description

Summary

When decoding a compressed response body (gzip, deflate, br, or zstd), HTTPX2 fully decompressed each network read before yielding content to the application. A small compressed input could therefore cause a large intermediate memory allocation, even when the application streamed the response to keep memory usage bounded.

Details

HTTPX2's default transport reads the socket in pieces of up to 64 KiB. Before 2.12.0, each piece was inflated completely into one intermediate allocation before any decompressed bytes were yielded.

At DEFLATE's maximum compression ratio of roughly 1032:1, a 64 KiB compressed chunk can expand to about 64 MiB in one allocation. Brotli and Zstandard responses can cause similarly large amplification. Streaming the response did not prevent these transient allocations.

Impact

Applications that fetch resources from untrusted or attacker-influenced servers - such as webhook receivers, link unfurlers, crawlers, SSRF-reachable fetchers, and redirect followers - can experience memory pressure or out-of-memory termination when processing a malicious compressed response. No authentication or user interaction is required beyond issuing a request to the server.

Mitigation

Upgrade to HTTPX2 2.12.0 or later. Patched versions decompress responses incrementally with bounded intermediate buffers, including responses with multiple content encodings.

Affected versions

PyPI

PackageVulnerableFixed in
httpx2
< 2.12.0
2.12.0
httpx2
< 2.12.0
2.12.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

httpx2 PyPI → 2.12.0

pip
pip install --upgrade "httpx2>=2.12.0"
poetry
poetry add "httpx2>=2.12.0"
uv
uv add "httpx2>=2.12.0"

Severity breakdown

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)

The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-7mj9-2mp8-4m2p
HTTPX2: Secure WebSocket traffic sent without TLS through SOCKS proxies
High Also affects httpx2
GHSA-pf96-p4fj-6566
HTTPX2: Conflicting Content-Length and Transfer-Encoding headers can be auto-generated
Medium Also affects httpx2
GHSA-h4x7-gw46-3wm6
HTTPX2: Multipart part header injection via unvalidated file Content-Type and custom headers
Medium Also affects httpx2
GHSA-f2fp-rgf2-35cp
HTTPX2: Quadratic SSE line buffering can cause CPU denial of service
Medium Also affects httpx2
EEF-CVE-2026-65627
Decompression bomb via unbounded zlib:inflate in jose_jwe_zip:uncompress/2
Not rated yet Same weakness, CWE-409
EEF-CVE-2026-97200
Unbounded response body buffering and decompression in hackney
Not rated yet Same weakness, CWE-409
EEF-CVE-2026-109584
HTTP/2 cookie crumb join expands a small HPACK header block into an unbounded allocation in Bandit
Not rated yet Same weakness, CWE-409
EEF-CVE-2026-93471
Unbounded SAML message decompression in esaml allows memory exhaustion
Not rated yet Same weakness, CWE-409

Credits: tawAsh1

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor