CVE-2026-97688: urllib3 infinite loop in Deflate decoder

CVE-2026-97688 · Severity: medium · CVSS 4 · Published 2026-09-29

urllib3 is a widely-used Python HTTP client library that handles web requests for thousands of applications. A malicious server can send a specially crafted compressed response that causes urllib3 to enter an infinite loop, consuming excessive CPU and preventing the request from completing. Applications relying on network timeouts to stop hung requests are not protected because the loop does not perform any further socket reads.

Technologies: urllib3 (PyPI), Urllib3. Vendors: PyPI, Urllib3.

Quick answers

Is CVE-2026-97688 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-97688 being exploited in the wild.
How severe is CVE-2026-97688?
Medium severity, with a CVSS score of 4, published 29 September 2026.
Which products and versions are affected?
urllib3 (PyPI) >= 2.6.2, < 2.8.0, ECOSYSTEM:introduced=2.6.2,fixed=2.8.0; Urllib3 2.6.2 through 2.7.x.
Is there a fix for CVE-2026-97688?
Yes. urllib3 (PyPI): upgrade to 2.8.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-97688 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-97688?
Check whether you run urllib3 (PyPI) or Urllib3 at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • urllib3 (PyPI): upgrade to 2.8.0 or later
    pip install "urllib3>=2.8.0"

Technical details

The Deflate decoder in HTTPResponse.stream() and read_chunked() retains unconsumed trailing bytes after reaching end-of-stream and repeatedly decodes them without progress, causing an infinite loop when processing a chunked Deflate response (Transfer-Encoding: chunked + Content-Encoding: deflate) whose decoded body exceeds the specified chunk size and whose encoded body contains trailing bytes. The vulnerability requires content decoding to be enabled and a positive finite chunk size parameter. The fix prevents the decoder from retaining trailing bytes after stream termination.

Affected products

  • urllib3 urllib3 2.6.2 through 2.7.x

Identifiers

  • CVE-2026-97688
  • GHSA-gh4c-6fx4-qh6g
  • PYSEC-2026-4176

Timeline

  • 2026-09-15: patched: Fixed in version 2.8.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.