Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. urllib3
  4. ›
  5. CVE-2026-97688

CVE-2026-97688: urllib3: Chunked Deflate streaming can enter an infinite loop

September 30, 2026

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.

References

  • github.com/advisories/GHSA-gh4c-6fx4-qh6g
  • github.com/urllib3/urllib3/commit/ea2ad7b21a80da3632f80016526a18864586077f
  • github.com/urllib3/urllib3/releases/tag/2.8.0
  • github.com/urllib3/urllib3/security/advisories/GHSA-gh4c-6fx4-qh6g
  • nvd.nist.gov/vuln/detail/CVE-2026-97688

Code Behaviors & Features

Detect and mitigate CVE-2026-97688 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.6.2 before 2.8.0

Fixed versions

  • 2.8.0

Solution

Upgrade to version 2.8.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

Source file

pypi/urllib3/CVE-2026-97688.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 01 Oct 2026 12:19:38 +0000.