CVE-2026-21441: Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)
Impact urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once. urllib3 can perform decoding or decompression based on the HTTP Content-Encoding header (e.g., gzip, deflate, br, or zstd).
Published Jan 7, 2026 · Updated Jan 23, 2026
Affected packages
urllib3
- Ecosystem
- PyPI
- Affected
- >= 1.22, < 2.6.3
- Fixed in
- 2.6.3
- Check
pip show urllib3
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
urllib3's streaming API is designed for the efficient handling of large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once.
urllib3 can perform decoding or decompression based on the HTTP Content-Encoding header (e.g., gzip, deflate, br, or zstd). When using the streaming API, the library decompresses only the necessary bytes, enabling partial content consumption.
However, for HTTP redirect responses, the library would read the entire response body to drain the connection and decompress the content unnecessarily. This decompression occurred even before any read methods were called, and configured read limits did not restrict the amount of decompressed data. As a result, there was no safeguard against decompression bombs. A malicious server could exploit this to trigger excessive resource consumption on the client (high CPU usage and large memory allocations for decompressed data; CWE-409).
Affected usages
Applications and libraries using urllib3 version 2.6.2 and earlier to stream content from untrusted sources by setting preload_content=False when they do not disable redirects.
Remediation
Upgrade to at least urllib3 v2.6.3 in which the library does not decode content of redirect responses when preload_content=False.
If upgrading is not immediately possible, disable redirects by setting redirect=False for requests to untrusted source.
Credited to D47A, illia-v, pquentin, sethmlarson.
References
- https://github.com/urllib3/urllib3/security/advisories/GHSA-38jv-5279-wg99
- https://github.com/urllib3/urllib3/commit/8864ac407bba8607950025e0979c4c69bc7abc7b
- https://nvd.nist.gov/vuln/detail/CVE-2026-21441
- https://lists.debian.org/debian-lts-announce/2026/01/msg00017.html
- https://github.com/advisories/GHSA-38jv-5279-wg99
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-2025-66418
urllib3 allows an unbounded number of links in the decompression chain
high8.9Dec 5, 2025
