CVE-2026-97688

urllib3: Chunked Deflate streaming can enter an infinite loop

Published Sep 29, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability causes an infinite loop when urllib3 processes a chunked response that is deflate‑encoded and contains trailing bytes after the stream ends. When the Deflate decoder consumes these trailing bytes, it repeatedly attempts to decode them without making further progress, leading to excessive CPU usage and a request that never completes. Because the socket read is never invoked again, even network read timeouts cannot break the loop.

Affected Systems

Python applications that use urllib3 versions 2.6.2 through 2.7.x, including the HTTPResponse.stream and HTTPResponse.read_chunked methods with content decoding enabled, are affected. Any client that relies on urllib3 to fetch data from untrusted servers and processes responses with Transfer‑Encoding: chunked and Content‑Encoding: deflate may trigger the loop if the server delivers a compressed chunked response with trailing bytes.

Risk and Exploitability

The CVSS score of 6.9 indicates moderate severity, and the EPSS score is not available, but the vulnerability is not listed in the CISA KEV catalog. Attackers can trigger the loop by sending a crafted deflate response with trailing bytes to an unsuspecting urllib3 client. The exploit requires only network access to the vulnerable client; no privileged access or complex preparation is needed. The resulting denial of service may consume all CPU resources, stall requests, and degrade application availability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade urllib3 to version 2.8.0 or later.
  • If the upgrade cannot be applied immediately, disable content decoding for untrusted servers or avoid using HTTPResponse.stream or HTTPResponse.read_chunked with deflate decoding in production traffic.
  • Monitor application CPU usage and request completion times to detect abnormal behavior that may indicate exploitation.

Generated by OpenCVE AI on September 30, 2026 at 01:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-gh4c-6fx4-qh6g urllib3: Chunked Deflate streaming can enter an infinite loop
History
Type Values Removed Values Added
First Time appeared Python
Python urllib3
CPEs cpe:2.3:a:python:urllib3:*:*:*:*:*:*:*:*
Vendors & Products Python
Python urllib3
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Urllib3
Urllib3 urllib3
Vendors & Products Urllib3
Urllib3 urllib3
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title urllib3: Chunked Deflate streaming can enter an infinite loop
Weaknesses CWE-835
References
Metrics cvssV4_0

{'score': 6.9, 'vector': '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'}

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 29, 2026, 3:42 PM
Reserved
Sep 24, 2026, 9:43 PM
Status
Analyzed
Published
Sep 29, 2026, 4:17 PM
Modified
Oct 13, 2026, 8:21 PM
Severity
Moderate
Public date
Sep 29, 2026, 3:32 PM