CVE-2026-97688 — Vulnerability in urllib3 — CVE Details
urllib3: Chunked Deflate streaming can enter an infinite loop
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.51%). Schedule for your next planned update.
Does your project use an affected urllib3 version?
Paste your requirements.txt to check it for CVE-2026-97688 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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:
- Compressed responses from an untrusted source are streamed using
HTTPResponse.stream(amt=N)orHTTPResponse.read_chunked(amt=N)with a positive, finite chunk size. - Content decoding is enabled.
- The response uses both
Transfer-Encoding: chunkedandContent-Encoding: deflate. - 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 reports trailing bytes as data that can produce more decoded output.
If upgrading is not immediately possible, disable automatic content decoding for responses from untrusted sources by setting decode_content=False, or reject streamed responses using the Deflate content encoding. Applications that disable automatic decoding must handle the compressed response safely at another layer.
Advisory Timeline
- First published September 30, 2026 (57 days ago).
- Last revised October 1, 2026 — 1 day after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "urllib3>=2.8.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| urllib3 PyPI · Affected: 2.6.2, 2.6.3, 2.7.0 | 2.8.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-835
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
References
- https://github.com/urllib3/urllib3/security/advisories/GHSA-gh4c-6fx4-qh6gWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-97688ADVISORY
- https://github.com/urllib3/urllib3/commit/ea2ad7b21a80da3632f80016526a18864586077fWEB
- https://github.com/urllib3/urllib3PACKAGE
- https://github.com/urllib3/urllib3/releases/tag/2.8.0WEB
Frequently Asked Questions
- What is CVE-2026-97688?
- urllib3: Chunked Deflate streaming can enter an infinite loop. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
- How do I check if my project is affected by CVE-2026-97688?
- CVE-2026-97688 affects urllib3. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-97688 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 36.4% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2023-43804HIGH
- CVE-2026-44432HIGH
- CVE-2025-66471HIGH
urllib3 streaming API improperly handles highly compressed data
- CVE-2026-21441HIGH
Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)
- CVE-2025-66418HIGH
urllib3 allows an unbounded number of links in the decompression chain
- CVE-2023-45803MEDIUM
- CVE-2026-44431MEDIUM
- CVE-2024-37891MEDIUM
urllib3's Proxy-Authorization request header isn't stripped during cross-origin redirects