{"id":2450,"cve":"CVE-2026-97688","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-97688\/","cwe":"CWE-835","cwe_number":835,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/835","cvss_score":6.9,"published":"2026-09-29","owasp":"A04 Insecure Design","odc":"Timing\/Serialization","cdc":"Timing Issues","category":"Resource Management","subcategory":"Resource Exhaustion","scope":"Remote","impact":"Denial of Service (DoS)","summary":"Infinite loop in urllib3 HTTPResponse when decoding chunked deflate data","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-97688\/","description":"urllib3 is an HTTP client library for Python. From 2.6.2 until 2.8.0, HTTPResponse.stream and HTTPResponse.read_chunked can enter an infinite loop because the Deflate decoder retains trailing bytes as unconsumed input after reaching end-of-stream and repeatedly decodes them without progress. The issue occurs when an untrusted server sends a chunked Deflate response whose decoded body exceeds a positive finite chunk size and whose encoded body has trailing bytes, specifically a response with Transfer-Encoding: chunked and Content-Encoding: deflate, content decoding enabled, and the positive finite amt=N streaming chunk size. The attack mechanism is that a malicious server returns a compressed chunked response with trailing bytes after the Deflate stream. The impact is excessive CPU usage and a request that does not complete, and network read timeouts do not interrupt the loop because no further socket read occurs. This issue is fixed in version 2.8.0.","solution":"Upgrade urllib3 to version\u202f2.8.0 (or later).","affected_component":"urllib3","fixed_by_upgrading":true,"vulnerable_code":"import urllib3\n\ndef fetch(url):\n    http = urllib3.PoolManager()\n    resp = http.request('GET', url, preload_content=False)\n    # VULNERABLE: streaming deflate content can loop indefinitely\n    for chunk in resp.stream(amt=1024):\n        process(chunk)\n\ndef process(data):\n    # placeholder for processing logic\n    pass\n","patched_code":"import urllib3\nimport zlib\n\ndef fetch(url):\n    http = urllib3.PoolManager()\n    resp = http.request('GET', url, preload_content=False)\n    # FIX: disable automatic deflate decoding to avoid infinite loop\n    resp.decode_content = False\n    decompressor = zlib.decompressobj(-zlib.MAX_WBITS)\n    for chunk in resp.stream(amt=1024):\n        data = decompressor.decompress(chunk)\n        if data:\n            process(data)\n\ndef process(data):\n    # placeholder for processing logic\n    pass\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"urllib3\/urllib3","commit_url":"https:\/\/github.com\/urllib3\/urllib3\/commit\/ea2ad7b21a80da3632f80016526a18864586077f","commit_subject":"Merge commit from fork","units":[{"file":"src\/urllib3\/response.py","function":"DeflateDecoder.decompress"},{"file":"src\/urllib3\/response.py","function":"DeflateDecoder.has_unconsumed_tail"}]}],"references":null}