HighGHSA-38jv-5279-wg99CVE-2026-21441PYSEC-2026-1996

Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)

Published 7 Jan 2026 · Updated 10 Sept 2026

Is your project on an affected urllib3?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
>=1.22 <2.6.3
Fixed in
2.6.3
Update to the fixed version for your release line, for example:pip install 'urllib3>=2.6.3'

Details

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.

Is GHSA-38jv-5279-wg99 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected urllib3, and gives you the command that fixes it.

More advisories for urllib3

  • MediumCVE-2026-97688urllib3: Chunked Deflate streaming can enter an infinite loop · 30 Sept 2026
  • HighCVE-2026-97689urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory · 30 Sept 2026
  • HighCVE-2026-97687urllib3: HTTPS proxy TLS configuration may be ignored or overridden · 30 Sept 2026
  • HighCVE-2026-44432urllib3: Decompression-bomb safeguards bypassed in parts of the streaming API · 11 May 2026
  • HighCVE-2026-44431urllib3: Sensitive headers forwarded across origins in proxied low-level redirects · 11 May 2026
  • HighCVE-2025-66471urllib3 streaming API improperly handles highly compressed data · 5 Dec 2025
All 22 advisories for urllib3

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.