HTTPX2
HTTPX2: Streaming response decompression does not bound peak memory (decompression amplification)
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.12.0
Fixed in 2.12.0
Mitigation
Upgrade httpx2 to 2.12.0 or later.
References
- Vendor advisory github.com/pydantic/httpx2/security/advisories…
- Patch github.com/pydantic/httpx2/pull/1126
- Patch github.com/pydantic/httpx2/commit/4fd0c70a3f20…
1 more
- Release notes github.com/pydantic/httpx2/releases/tag/v2.12.…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.