CVE-2026-21441
Unknown Unknown - Not Provided
Decompression Bomb Vulnerability in urllib3 Streaming API

Publication date: 2026-01-07

Last updated on: 2026-01-07

Assigner: GitHub, Inc.

Description
urllib3 is an HTTP client library for Python. 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. Starting in version 1.22 and prior to version 2.6.3, 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. Applications and libraries are affected when they stream content from untrusted sources by setting `preload_content=False` when they do not disable redirects. Users should 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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-01-07
Last Modified
2026-01-07
Generated
2026-05-07
AI Q&A
2026-01-08
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
urllib3 urllib3 From 2.6.3|end_excluding=2.6.3 (inc)
urllib3 urllib3 to 2.6.3 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-409 The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in urllib3's streaming API for handling HTTP responses. When processing HTTP redirect responses with streaming enabled (preload_content=False) and redirects not disabled, urllib3 versions from 1.22 up to before 2.6.3 would decompress the entire response body unnecessarily before any read methods were called. This decompression was not limited by configured read limits, allowing a malicious server to send a decompression bomb that triggers excessive resource consumption on the client.


How can this vulnerability impact me? :

The vulnerability can lead to excessive resource consumption on the client side, such as high memory and CPU usage, caused by decompressing large or maliciously crafted HTTP redirect response bodies. This can degrade application performance, cause crashes, or denial of service when streaming content from untrusted sources without disabling redirects.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, upgrade urllib3 to at least version 2.6.3. If upgrading immediately is not possible, disable redirects by setting redirect=False for requests to untrusted sources when using the streaming API with preload_content=False.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart