CVE-2025-66471 — Vulnerability in urllib3 — CVE Details
urllib3 streaming API improperly handles highly compressed data
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.
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 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).
| Package | Fixed 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.
- CWE-409
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.0 score means for each attack dimension.
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
References
- https://github.com/urllib3/urllib3/security/advisories/GHSA-2xpw-w6gg-jr37WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-66471ADVISORY
- https://github.com/urllib3/urllib3/commit/c19571de34c47de3a766541b041637ba5f716ed7WEB
- https://github.com/urllib3/urllib3/commit/d0fde3672e4a4093f7587858dccfc298eb66e46cWEB
- https://github.com/advisories/GHSA-2xpw-w6gg-jr37ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2026-1994.yamlWEB
- https://github.com/urllib3/urllib3PACKAGE
- https://pypi.org/project/urllib3WEB
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
Significant impact if exploited, or exploitable with modest effort.
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
Related CVEs
- CVE-2026-44432HIGH
- CVE-2026-21441HIGH
Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)
- CVE-2025-66418HIGH
urllib3 allows an unbounded number of links in the decompression chain
- CVE-2026-97687HIGH
urllib3: HTTPS proxy TLS configuration may be ignored or overridden
- CVE-2026-44431MEDIUM
- CVE-2024-37891MEDIUM
urllib3's Proxy-Authorization request header isn't stripped during cross-origin redirects
- CVE-2025-50181MEDIUM
urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation
- CVE-2026-97688MEDIUM
urllib3: Chunked Deflate streaming can enter an infinite loop