All vulnerabilities
CVE-2025-66471GHSA-2xpw-w6gg-jr37PYSEC-2026-1994

urllib3 streaming API improperly handles highly compressed data

urllib3 urllib3pipLibraries & packages
CVSS
8.9High
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.68%Chance of exploitation activity in the next 30 days, higher than 51% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in2.6.0Fixed versionGitHub
Published5 Dec 2025Updated 25 Sep 2026CVE List

What fixes it

  • 2.6.0urllib3, pipGitHub
  • 2.6.0urllib3, PyPIOSVpip install "urllib3>=2.6.0"

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Impact

urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once.

When streaming a compressed response, urllib3 can perform decoding or decompression based on the HTTP Content-Encoding header (e.g., gzip, deflate, br, or zstd). The library must read compressed data from the network and decompress it until the requested chunk size is met. Any resulting decompressed data that exceeds the requested amount is held in an internal buffer for the next read operation.

The decompression logic could cause urllib3 to fully decode a small amount of highly compressed data in a single operation. This can result in excessive resource consumption (high CPU usage and massive memory allocation for the decompressed data; CWE-409) on the client side, even if the application only requested a small chunk of data.

Affected usages

Applications and libraries using urllib3 version 2.5.0 and earlier to stream large compressed responses or content from untrusted sources.

stream(), read(amt=256), read1(amt=256), read_chunked(amt=256), readinto(b) are examples of urllib3.HTTPResponse method calls using the affected logic unless decoding is disabled explicitly.

Remediation

Upgrade to at least urllib3 v2.6.0 in which the library avoids decompressing data that exceeds the requested amount.

If your environment contains a package facilitating the Brotli encoding, upgrade to at least Brotli 1.2.0 or brotlicffi 1.2.0.0 too. These versions are enforced by the urllib3[brotli] extra in the patched versions of urllib3.

Credits

The issue was reported by @Cycloctane. Supplemental information was provided by @stamparm during a security audit performed by 7ASecurity and facilitated by OSTIF.

Text from GitHub Advisory Database

Affected versions 53

  • urllib3, pip>= 1.0, < 2.6.0GitHub
  • urllib3affected: >= 1.0, < 2.6.0CVE List
  • urllib3, PyPIfrom 1.0, fixed in 2.6.0OSV
  • urllib3, PyPI1.0OSV
  • urllib3, PyPI1.0.1OSV
  • urllib3, PyPI1.0.2OSV
  • urllib3, PyPI1.1OSV
  • urllib3, PyPI1.10OSV
  • urllib3, PyPI1.10.1OSV
  • urllib3, PyPI1.10.2OSV
  • urllib3, PyPI1.10.3OSV
  • urllib3, PyPI1.10.4OSV
  • urllib3, PyPI1.11OSV
  • urllib3, PyPI1.12OSV
  • urllib3, PyPI1.13OSV
  • urllib3, PyPI1.13.1OSV
  • urllib3, PyPI1.14OSV
  • urllib3, PyPI1.15OSV
  • urllib3, PyPI1.15.1OSV
  • urllib3, PyPI1.16OSV
  • urllib3, PyPI1.17OSV
  • urllib3, PyPI1.18OSV
  • urllib3, PyPI1.18.1OSV
  • urllib3, PyPI1.19OSV
  • urllib3, PyPI1.19.1OSV
  • urllib3, PyPI1.2OSV
  • urllib3, PyPI1.2.1OSV
  • urllib3, PyPI1.2.2OSV
  • urllib3, PyPI1.20OSV
  • urllib3, PyPI1.21OSV
  • urllib3, PyPI1.21.1OSV
  • urllib3, PyPI1.22OSV
  • urllib3, PyPI1.23OSV
  • urllib3, PyPI1.24OSV
  • urllib3, PyPI1.24.1OSV
  • urllib3, PyPI1.24.2OSV
  • urllib3, PyPI1.24.3OSV
  • urllib3, PyPI1.25OSV
  • urllib3, PyPI1.25.1OSV
  • urllib3, PyPI1.25.10OSV
  • urllib3, PyPI1.25.11OSV
  • urllib3, PyPI1.25.2OSV
  • urllib3, PyPI1.25.3OSV
  • urllib3, PyPI1.25.4OSV
  • urllib3, PyPI1.25.5OSV
  • urllib3, PyPI1.25.6OSV
  • urllib3, PyPI1.25.7OSV
  • urllib3, PyPI1.25.8OSV
  • urllib3, PyPI1.25.9OSV
  • urllib3, PyPI1.26.0OSV
  • urllib3, PyPI1.26.1OSV
  • urllib3, PyPI1.26.10OSV
  • urllib3, PyPI1.26.11OSV

References 8