NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

CVE-2025-66418: urllib3 allows an unbounded number of links in the decompression chain

highCVSS 4.0 8.9GHSA-gm62-xv2j-4w53

Impact urllib3 supports chained HTTP encoding algorithms for response content according to RFC 9110 (e.g., Content-Encoding: gzip, zstd). However, the number of links in the decompression chain was unbounded allowing a malicious server to insert a virtually unlimited number of compression steps leading to high CPU usage and massive memory allocation for the decompressed data.

Published Dec 5, 2025

Affected packages

urllib3

Ecosystem
PyPI
Affected
>= 1.24, < 2.6.0
Fixed in
2.6.0
Check
pip show urllib3

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

urllib3 supports chained HTTP encoding algorithms for response content according to RFC 9110 (e.g., Content-Encoding: gzip, zstd).

However, the number of links in the decompression chain was unbounded allowing a malicious server to insert a virtually unlimited number of compression steps leading to high CPU usage and massive memory allocation for the decompressed data.

Affected usages

Applications and libraries using urllib3 version 2.5.0 and earlier for HTTP requests to untrusted sources unless they disable content decoding explicitly.

Remediation

Upgrade to at least urllib3 v2.6.0 in which the library limits the number of links to 5.

If upgrading is not immediately possible, use `preload_content=False` and ensure that resp.headers["content-encoding"] contains a safe number of encodings before reading the response content.

Credited to illia-v, sethmlarson, pquentin.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More PyPI vulnerabilities

All PyPI entries