---
schema_version: '1.0'
id: security-20260812-ee7201
title: 'CVE-2026-21441: Decompression-bomb safeguards bypassed when following HTTP
  redirects (streaming API)'
url: https://osv.dev/vulnerability/PYSEC-2026-1996
url_hash: ee7201824612efa97844b3f0e85f02a232ae1c034c3c13390e2726ac3c484151
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-1996
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-21441
- PYSEC-2026-1996
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- urllib3
- PyPI
lang: en
published_at: '2026-07-07T16:03:16Z'
fetched_at: '2026-08-12T16:00:04.903765Z'
updated_at: '2026-08-22T14:53:01Z'
status: published
content_hash: 0d70d3805bf49009f8584e216d8db7584272f7ee31dc36599c320a30538a183b
content_changed_at: '2026-08-22T13:15:22.095501Z'
license_note: full
summary: Decompression-bomb safeguards bypassed when following HTTP redirects (streaming
  API)
summary_source: rss
summary_en: Decompression-bomb safeguards bypassed when following HTTP redirects (streaming
  API)
summary_omitted_reason: null
redistribution: true
keywords_en:
- API
- bypassed
- CVE
- CVE-2026-21441
- Decompression-bomb
- following
- Gift 5 articles to anyone you choose each month when you subscribe
- HTTP
- library vulnerability
- PyPI
- PYSEC-2026-1996
- redirects
- safeguards
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- software security
- streaming
- urllib3
- when
entities_en:
- name: CVE
  type: data
- name: Gift 5 articles to anyone you choose each month when you subscribe
  type: content
- name: PyPI
  type: artifact
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
- name: PyPI
  type: artifact
- name: Gift 5 articles to anyone you choose each month when you subscribe
  type: content
related_auto:
- name: Portal
  type: organization
  weight: 1.0
- name: Hugging Face
  type: organization
  weight: 1.0
computed_at: '2026-08-22T14:52:59Z'
---

# CVE-2026-21441: Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)

## TL;DR
Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)

## Key Points
- cve / CVE-2026-21441 / PYSEC-2026-1996 / severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H / urllib3 / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
**Advisory:** PYSEC-2026-1996 (CVE-2026-21441)

**Details:**
### Impact

urllib3's [streaming API](https://urllib3.readthedocs.io/en/2.6.2/advanced-usage.html#streaming-and-i-o) 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](https://urllib3.readthedocs.io/en/2.6.2/user-guide.html#retrying-requests) by setting `redirect=False` for requests to untrusted source.

**References:**
- https://github.com/urllib3/urllib3/security/advisories/GHSA-38jv-5279-wg99
- https://nvd.nist.gov/vuln/detail/CVE-2026-21441
- https://github.com/urllib3/urllib3/commit/8864ac407bba8607950025e0979c4c69bc7abc7b
- https://github.com/urllib3/urllib3
- https://lists.debian.org/debian-lts-announce/2026/01/msg00017.html
- https://pypi.org/project/urllib3
- https://github.com/advisories/GHSA-38jv-5279-wg99

_Data: OSV.dev (upstream: pypa) — https://osv.dev/vulnerability/PYSEC-2026-1996_

## Source
元記事: [CVE-2026-21441: Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)](https://osv.dev/vulnerability/PYSEC-2026-1996) — published 2026-07-07T16:03:16Z
