Vulnerabilities in pkg:pypi/urllib3

PACKAGE
Advisory Identifier: GHSA-gh4c-6fx4-qh6g
Advisory Summary

CVE-2026-97688 is a MODERATE chunked deflate streaming can enter vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting urllib3 libraries in the PyPI ecosystem. The issue involves chunked deflate streaming can enter an infinite loop. Remediation is available by upgrading affected packages to version 2.8.0.

22 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/urllib3

22 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/urllib3. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-gh4c-6fx4-qh6g CVE-2026-97688 MODERATE urllib3: Chunked Deflate streaming can enter an infinite loop
GHSA-vxq7-64xx-v4gw CVE-2026-97689 HIGH urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory
GHSA-8988-9cw3-xx77 CVE-2026-97687 HIGH urllib3: HTTPS proxy TLS configuration may be ignored or overridden
GHSA-2xpw-w6gg-jr37 CVE-2025-66471 HIGH urllib3 streaming API improperly handles highly compressed data
GHSA-q2q7-5pp4-w6pg CVE-2021-33503 HIGH Catastrophic backtracking in URL authority parser when passed URL containing many @ characters
GHSA-mf9v-mfxr-j63j CVE-2026-44432 HIGH urllib3: Decompression-bomb safeguards bypassed in parts of the streaming API
GHSA-qccp-gfcp-xxvc CVE-2026-44431 HIGH urllib3: Sensitive headers forwarded across origins in proxied low-level redirects
GHSA-38jv-5279-wg99 CVE-2026-21441 HIGH Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)
GHSA-pq67-6m6q-mj2v CVE-2025-50181 MODERATE urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation
GHSA-48p4-8xcf-vxj5 CVE-2025-50182 MODERATE urllib3 does not control redirects in browsers and Node.js
GHSA-gm62-xv2j-4w53 CVE-2025-66418 HIGH urllib3 allows an unbounded number of links in the decompression chain
GHSA-34jh-p97f-mpxf CVE-2024-37891 MODERATE urllib3's Proxy-Authorization request header isn't stripped during cross-origin redirects
GHSA-g4mx-q9vg-27p4 CVE-2023-45803 MODERATE urllib3's request body not stripped after redirect from 303 status changes request method to GET
GHSA-v845-jxx5-vc9f CVE-2023-43804 HIGH `Cookie` HTTP header isn't stripped on cross-origin redirects
GHSA-www2-v7xj-xrc6 CVE-2018-20060 CRITICAL Exposure of Sensitive Information to an Unauthorized Actor in urllib3
GHSA-gwvm-45gx-3cf8 CVE-2018-25091 MODERATE Authorization Header forwarded on redirect
GHSA-v4w5-p2hg-8fh6 CVE-2016-9015 MODERATE Urllib3 Incorrect Certificate Validation
GHSA-r64q-w8jr-g9qp CVE-2019-11236 MODERATE Improper Neutralization of CRLF Sequences in urllib3 library for Python
GHSA-5phf-pp7p-vc2r CVE-2021-28363 MODERATE Using default SSLContext for HTTPS requests in an HTTPS proxy doesn't verify certificate hostname for proxy connection
GHSA-wqvq-5m8c-6g24 CVE-2020-26137 MODERATE CRLF injection in urllib3
GHSA-hmv2-79q8-fv6g CVE-2020-7212 HIGH Uncontrolled Resource Consumption in urllib3
GHSA-mh33-7rrq-662w CVE-2019-11324 HIGH Improper Certificate Validation in urllib3

CVE-2026-97688 at a Glance

CVE Identifier CVE-2026-97688
GHSA Identifier GHSA-gh4c-6fx4-qh6g
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product urllib3
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-97688

To remediate this vulnerability, upgrade all affected urllib3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

urllib3 fixed: 2.8.0
pip install urllib3>=2.8.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show urllib3

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-97688, inspect your installed packages using pip:

pip show urllib3

Analyze the terminal output to locate any version of urllib3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.8.0), your application is affected.

Note: The pip show urllib3 command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In urllib3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 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.

CVE-2026-97688 Affected urllib3 Versions

1 component(s)
Fixed Versions:
2.8.0
Product / Package Ecosystem Affected Versions Fixed Version
urllib3
PyPI
≥ 2.6.2
< 2.8.0
2.8.0

References

Frequently Asked Questions

What is CVE-2026-97688?
CVE-2026-97688 is a security vulnerability in urllib3 involving Chunked Deflate streaming can enter an infinite loop under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which urllib3 versions are affected?
Affected versions include releases prior to 2.8.0 across affected packages: urllib3.
What version fixes CVE-2026-97688?
Upgrading to 2.8.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is urllib3 affected?
Yes, urllib3 is affected in releases prior to 2.8.0. Upgrade your dependency to 2.8.0 or later.
What CWE is associated with CVE-2026-97688?
CVE-2026-97688 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check PyPI dependencies for CVE-2026-97688?
Run the dependency tree command: 'pip show urllib3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gh4c-6fx4-qh6g",
  "modified" : "2026-09-30T15:00:38Z",
  "published" : "2026-09-30T15:00:38Z",
  "aliases" : [ "CVE-2026-97688" ],
  "summary" : "urllib3: Chunked Deflate streaming can enter an infinite loop",
  "details" : "### Impact\n\nurllib3'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.\n\nurllib3 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.\n\nHowever, 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.\n\nA 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.\n\n### Affected usages\n\nApplications and libraries using urllib3 versions 2.6.2 through 2.7.0 may be affected when all of the following conditions are met:\n\n1. 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.\n2. Content decoding is enabled.\n3. The response uses both `Transfer-Encoding: chunked` and `Content-Encoding: deflate`.\n4. The decoded body exceeds the requested chunk size and the encoded body contains bytes after the end of the Deflate stream.\n\n`HTTPResponse.stream()` uses a finite chunk size by default and is therefore affected when the other conditions are met.\n\n### Remediation\n\nUpgrade 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.\n\nIf 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "urllib3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.2"
      }, {
        "fixed" : "2.8.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/urllib3/urllib3/security/advisories/GHSA-gh4c-6fx4-qh6g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-97688"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/urllib3/urllib3/commit/ea2ad7b21a80da3632f80016526a18864586077f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/urllib3/urllib3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/urllib3/urllib3/releases/tag/2.8.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-30T15:00:38Z",
    "nvd_published_at" : "2026-09-29T16:17:18Z"
  }
}