Vulnerability PYSEC-2026-1998

Unknown
UNKNOWN RISK
Vulnerabilities without an assigned CVSS score. Severity is not determinable from available data.
2 months ago
July 07, 2026 at 04:03 PM UTC
urllib3 allows an unbounded number of links in the decompression chain
1.24 - 2.5.0
1.24 - 2.5.0

Summary

urllib3 allows an unbounded number of links in the decompression chain

Details

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.

Impacted packages

Timeline

Published
2 months ago
July 07, 2026 at 04:03 PM UTC
Fixed (2.6.0)
9 months ago
December 05, 2025 at 03:08 PM UTC
Last Modified
2 months ago
July 07, 2026 at 05:47 PM UTC