mediumVulnerability

CVE-2026-97688

### Impact urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading content in chunks instead of loading the entire response body into memory at once. urllib3 can decompress response bodies according to the HTTP `Content-Encoding` header. When streaming a compressed, chunked response, urllib3 first consumes data already buffered by the decoder before reading the next HTTP chunk. However, urllib3 versions from 2.6.2 through 2.7.0 could enter an infinite loop when a chunked response contained bytes after the end of the Deflate stream. If the decompressed body exceeded the requested streaming chunk size, Python's zlib implementation could retain the trailing bytes as unconsumed input after reaching the end of the compressed stream. urllib3 would repeatedly attempt to decode those same bytes without making progress or reading more data from the network. A malicious server could exploit this behavior to cause excessive CPU usage and prevent the affected request from completing on the client. Network read timeouts would not interrupt the loop because no further socket operation was required. ### Affected usages Applications and libraries using urllib3 versions 2.6.2 through 2.7.0 may be affected when all of the following conditions are met: 1. Compressed responses from an untrusted source are streamed using `HTTPResponse.stream(amt=N)` or `HTTPResponse.read_chunked(amt=N)` with a positive, finite chunk size. 2. Content decoding is enabled. 3. The response uses both `Transfer-Encoding: chunked` and `Content-Encoding: deflate`. 4. The decoded body exceeds the requested chunk size and the encoded body contains bytes after the end of the Deflate stream. `HTTPResponse.stream()` uses a finite chunk size by default and is therefore affected when the other conditions are met. ### Remediation Upgrade to urllib3 2.8.0, in which the Deflate decoder stops accepting input after reaching the end of the compressed stream and no longer r

Properties

ghsa_id
GHSA-gh4c-6fx4-qh6g
severity
medium
summary
urllib3: Chunked Deflate streaming can enter an infinite loop
last_source
GitHub Advisory Database
cve_id
CVE-2026-97688
signal_observed_at
2026-09-30T23:58:31+00:00
is_ghsa_only
false
retrieved_at
2026-09-30T23:58:31+00:00
ghsa_published
2026-09-30T15:00:38Z
source_url
https://github.com/advisories/GHSA-gh4c-6fx4-qh6g
ghsa_updated
2026-09-30T15:00:39Z

Related Entities (4)

REPORTED_BY (1)

→[Source]GitHub Advisory Database

VULNERABLE_TO (1)

←[Software]pip/urllib3

AFFECTS (1)

→[Software]pip/urllib3

HAS_WEAKNESS (1)

→[Weakness]Loop with Unreachable Exit Condition ('Infinite Loop')

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-97688 — Ninja Signal Threat Intelligence | Ninja Signal