{"id":2328,"cve":"CVE-2026-84382","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-84382\/","cwe":"CWE-409","cwe_number":409,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/409","cvss_score":7.5,"published":"2026-09-02","owasp":"A04 Insecure Design","odc":"Algorithm","cdc":"Incorrect Algorithm","category":"Resource Management","subcategory":"Resource Exhaustion","scope":"Remote","impact":"Denial of Service (DoS)","summary":"Memory exhaustion via unbounded decompression of streamed HTTP responses.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-84382\/","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.","solution":"Upgrade\u202fhttpx2\u202fto\u202fversion\u202f2.12.0\u202for newer.","affected_component":"HTTPX2","fixed_by_upgrading":true,"vulnerable_code":"import httpx2\n\ndef fetch(url: str) -> bytes:\n    \"\"\"Stream the response while letting httpx2 fully inflate each chunk.\"\"\"\n    # VULNERABLE: full decompression of each network chunk causes memory blow\u2011up\n    with httpx2.Client() as client:\n        resp = client.get(url, stream=True)\n        data = b\"\"\n        for chunk in resp.iter_bytes():\n            data += chunk\n        return data\n","patched_code":"import httpx2\nimport zlib\n\ndef fetch(url: str) -> bytes:\n    \"\"\"Stream the response and decompress incrementally to avoid large allocations.\"\"\"\n    # FIX: incremental decompression prevents full in\u2011memory inflation\n    with httpx2.Client() as client:\n        resp = client.get(url, stream=True, decode_content=False)\n        decompressor = zlib.decompressobj()\n        data = b\"\"\n        for raw_chunk in resp.aiter_raw():\n            data += decompressor.decompress(raw_chunk)\n        data += decompressor.flush()\n        return data\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"pydantic\/httpx2","commit_url":"https:\/\/github.com\/pydantic\/httpx2\/commit\/4fd0c70a3f207c618b145934792f791bccfb39f8","commit_subject":"Decode compressed response bodies incrementally (#1126)","units":[{"file":"src\/httpx2\/httpx2\/_client.py","function":"BoundAsyncStream.__aiter__"},{"file":"src\/httpx2\/httpx2\/_content.py","function":null},{"file":"src\/httpx2\/httpx2\/_content.py","function":"AsyncIteratorByteStream.__aiter__"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":null},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"BrotliDecoder.decode"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"BrotliDecoder.flush"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"BrotliDecoder.__init__"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"ContentDecoder.decode"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"ContentDecoder.flush"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"DeflateDecoder.decode"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"DeflateDecoder.flush"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"DeflateDecoder.__init__"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"GZipDecoder.decode"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"GZipDecoder.__init__"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"IdentityDecoder.decode"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"IdentityDecoder.flush"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"MultiDecoder.decode"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"MultiDecoder.flush"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"ZStandardDecoder.decode"},{"file":"src\/httpx2\/httpx2\/_decoders.py","function":"ZStandardDecoder.flush"},{"file":"src\/httpx2\/httpx2\/_models.py","function":null},{"file":"src\/httpx2\/httpx2\/_models.py","function":"Response.aiter_bytes"},{"file":"src\/httpx2\/httpx2\/_models.py","function":"Response.aiter_raw"},{"file":"src\/httpx2\/httpx2\/_models.py","function":"Response.aread"},{"file":"src\/httpx2\/httpx2\/_models.py","function":"Response.iter_bytes"},{"file":"src\/httpx2\/httpx2\/_models.py","function":"Response.iter_raw"}]}],"references":null}