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.
Applications and libraries using urllib3 version 2.5.0 and earlier for HTTP requests to untrusted sources unless they disable content decoding explicitly.
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 <code>preload_content=False</code> and ensure that resp.headers["content-encoding"] contains a safe number of encodings before reading the response content.
{
"severity": "HIGH",
"github_reviewed": true,
"cwe_ids": [
"CWE-770"
],
"github_reviewed_at": "2025-12-05T18:15:19Z",
"nvd_published_at": "2025-12-05T16:15:51Z"
}