CVE-2026-21441: urllib3 vulnerable to decompression-bomb safeguard bypass when following HTTP redirects (streaming API)

Published Jan 7, 2026
·
Updated

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 preloadcontent=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 preloadcontent=False.

If upgrading is not immediately possible, disable redirects by setting redirect=False for requests to untrusted source.

Other sources

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 preloadcontent=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 preloadcontent=False. If upgrading is not immediately possible, disable redirects by setting redirect=False for requests to untrusted source.

MITRE

Affected Software

4 affected componentsFixes available
pip/urllib3>=1.22<2.6.3
2.6.3
Python urllib3>=1.22<2.6.3
IBM Db2 Genius Hub<=1.1, 1.1.1, 1.1.2
IBM Agentics<=1.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/urllib3 to a version that resolves this vulnerability.

    Fixed in 2.6.3
  2. Upgrade

    Upgrade urllib3 to a version that resolves this vulnerability.

    Fixed in 2.6.3
  3. Configuration

    When streaming from untrusted sources and you do not disable redirects, set preload_content=False as described; however, to avoid the decompression-bomb safeguard bypass on redirects, also disable redirects (see redirect=False action).

    urllib3 preload_content = False
  4. Configuration

    If upgrading is not immediately possible, disable redirects for requests to untrusted sources by setting redirect=False, especially when using preload_content=False.

    urllib3 redirect = False

Event History

Jan 7, 2026
Advisory Published
via GitHub·07:18 PM
Data Sourced
via GitHub·07:18 PM
DescriptionWeaknessAffected Software
CVE Published
via MITRE·10:09 PM
Data Sourced
via MITRE·10:09 PM
DescriptionWeakness
Data Sourced
via NVD·10:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
RemedyAffected Software
Data Sourced
via Red Hat·11:02 PM
DescriptionSeverityAffected Software
Jul 13, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-21441?

CVE-2026-21441 is classified as a medium severity vulnerability.

2

How do I fix CVE-2026-21441?

To fix CVE-2026-21441, upgrade urllib3 to version 2.6.3 or later.

3

What versions of urllib3 are affected by CVE-2026-21441?

CVE-2026-21441 affects urllib3 versions from 1.22 up to 2.6.2.

4

What is the nature of the vulnerability in CVE-2026-21441?

CVE-2026-21441 involves a flaw in the streaming API of urllib3 that may lead to excessive memory use during handling of large HTTP responses.

5

Is there a known exploit for CVE-2026-21441?

As of now, there are no publicly known exploits specifically targeting CVE-2026-21441.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203