CVE-2025-66418: urllib3 allows an unbounded number of links in the decompression chain
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 entriesCVE-2026-97687
urllib3: HTTPS proxy TLS configuration may be ignored or overridden
high7.6Sep 30, 2026CVE-2026-97688
urllib3: Chunked Deflate streaming can enter an infinite loop
medium6.9Sep 30, 2026CVE-2026-97689
urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory
high8.9Sep 30, 2026CVE-2026-44431
urllib3: Sensitive headers forwarded across origins in proxied low-level redirects
high5.3May 11, 2026CVE-2026-44432
urllib3: Decompression-bomb safeguards bypassed in parts of the streaming API
high7.5May 11, 2026CVE-2026-21441
Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)
high7.5Jan 7, 2026
