CVE-2026-21441: Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)
(updated )
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).
References
- github.com/advisories/GHSA-38jv-5279-wg99
- github.com/urllib3/urllib3
- github.com/urllib3/urllib3/commit/8864ac407bba8607950025e0979c4c69bc7abc7b
- github.com/urllib3/urllib3/security/advisories/GHSA-38jv-5279-wg99
- lists.debian.org/debian-lts-announce/2026/01/msg00017.html
- nvd.nist.gov/vuln/detail/CVE-2026-21441
Code Behaviors & Features
Detect and mitigate CVE-2026-21441 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →