Skip to main content

CVE-2025-66471 — Vulnerability in urllib3 — CVE Details

HIGH

urllib3 streaming API improperly handles highly compressed data

Published December 5, 2025Updated September 25, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.76%). Schedule for your next planned update.

Does your project use an affected urllib3 version?

Paste your requirements.txt to check it for CVE-2025-66471 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my requirements.txt

Summary

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.

Advisory Timeline

  • First published December 5, 2025 (356 days ago).
  • Last revised September 25, 2026 — 294 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update urllib3 to 2.6.0 or later
pip install "urllib3>=2.6.0"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: PyPI (1).

PackageFixed In
urllib3 PyPI · Affected: 1.0, 1.0.1, 1.0.2, 1.1 (+94 more)2.6.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H

Frequently Asked Questions

What is CVE-2025-66471?
urllib3 streaming API improperly handles highly compressed data. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.0/10).
How do I check if my project is affected by CVE-2025-66471?
CVE-2025-66471 affects urllib3. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-66471 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.0

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.76%
EPSS percentile: 51.6

This is an above-median EPSS score — 51.6% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-2xpw-w6gg-jr37
PYSEC-2026-1994

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my requirements.txt