CVE-2025-66471: urllib3 streaming API improper compression handling

CVE-2025-66471 · Severity: high · CVSS 7.5 · Published 2025-12-05

urllib3 is a popular Python HTTP client library used by millions of applications to fetch web content. When applications use urllib3's streaming API to read large compressed files or responses (e.g., gzip, brotli-compressed data), the library can decompress far more data than requested, causing extreme memory usage and CPU consumption on the client. An attacker hosting a malicious compressed file or response could trigger this behavior to exhaust system resources and crash the application.

Technologies: Google Brotli, urllib3 (PyPI). Vendors: Google, PyPI.

Quick answers

Is CVE-2025-66471 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-66471 being exploited in the wild.
How severe is CVE-2025-66471?
High severity, with a CVSS score of 7.5, published 5 December 2025.
Which products and versions are affected?
Brotlicffi prior to 1.2.0.0; Google Brotli prior to 1.2.0; urllib3 (PyPI) >= 1.0, < 2.6.0, ECOSYSTEM:introduced=1.0,fixed=2.6.0.
Is there a fix for CVE-2025-66471?
Yes. urllib3 (PyPI): upgrade to 2.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2025-66471 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2025-66471?
Check whether you run Brotlicffi, Google Brotli or urllib3 (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • urllib3 (PyPI): upgrade to 2.6.0 or later
    pip install "urllib3>=2.6.0"

Technical details

The vulnerability is a resource exhaustion issue (CWE-409) in urllib3's streaming decompression logic. When the application calls `stream()`, `read(amt=256)`, or similar methods on a compressed HTTP response, urllib3 reads and decompresses data to fulfill the requested chunk size. However, the library does not properly bound the decompression operation; highly compressed payloads can expand dramatically during a single decompression call, causing excessive memory allocation and CPU consumption despite only a small amount of data being requested. Attack vector is network-based and requires the application to stream untrusted compressed content. The vulnerability affects urllib3 versions 2.5.0 and earlier. Patched versions (2.6.0+) limit decompression to the requested amount.

Affected products

  • urllib3 urllib3 2.5.0 and earlier
  • Google Brotli prior to 1.2.0
  • brotlicffi brotlicffi prior to 1.2.0.0

Identifiers

  • CVE-2025-66471
  • GHSA-2xpw-w6gg-jr37
  • PYSEC-2026-1994

Timeline

  • 2025-12-05: disclosed: Public advisory GHSA-2xpw-w6gg-jr37 released
  • 2025-12-05: patched: urllib3 v2.6.0 patched; Brotli 1.2.0 and brotlicffi 1.2.0.0 recommended

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.