HIGH 7.5

CVE-2026-9375: urllib3 2.6.3 Decompression Bomb Bypass via Brotli Streaming

urllib3 2.6.3 contains a flaw that allows remote servers to crash applications by sending specially crafted compressed files. When an application uses urllib3's streaming mode to download data without checking the decompressed size, a malicious server can send a compressed payload that expands into enormous amounts of data in memory, exhausting system resources and causing the application to become unavailable. This affects users of popular Python libraries like `requests` that rely on urllib3 for HTTP communication.

Source data · NVD / CISA · public domain

CVSS
3.0 · 7.5 HIGH · CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-400
Affected products
0 configuration(s)
Published / Modified
2026-06-19 / 2026-06-22

NVD description (verbatim)

urllib3 version 2.6.3 is vulnerable to a decompression bomb bypass in its streaming API (`preload_content=False`) when using Brotli support. The issue arises due to three independent code paths in `response.py` that bypass the `max_length` protection introduced in version 2.6.0 to mitigate CVE-2025-66471. Specifically, negative `max_length` values can be produced due to buffer arithmetic in `read()`, `flush_decoder` unconditionally overrides `max_length` to `-1`, and `_flush_decoder()` passes no limit at all, defaulting to unlimited decompression. This allows a malicious HTTP server to trigger an out-of-memory (OOM) condition by decompressing large payloads into memory, leading to a denial of service (DoS). The vulnerability affects urllib3 2.6.3 and Brotli 1.2.0 and impacts applications and libraries using `requests` or `urllib3` to stream content from untrusted sources.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-9375 exploits three separate code paths in urllib3 2.6.3's `response.py` that circumvent the `max_length` decompression limit introduced in version 2.6.0. When `preload_content=False` (streaming mode) is combined with Brotli decompression, the vulnerability manifests through: (1) negative `max_length` values resulting from buffer arithmetic in the `read()` method, (2) `flush_decoder()` unconditionally resetting `max_length` to -1, and (3) `_flush_decoder()` passing no limit parameter, defaulting to unlimited decompression. An attacker controlling the HTTP server can craft a high-compression-ratio payload that decompresses to a size exceeding available memory, triggering an out-of-memory condition. The issue is specific to Brotli and does not affect gzip or deflate decoders in the same version.

Business impact

Organizations relying on urllib3 or requests to consume streaming content from untrusted or semi-trusted sources face immediate denial of service risk. Web services, data pipelines, and automated tools that process HTTP responses without explicit decompression limits are susceptible to crash-on-download attacks. The impact is particularly acute in multi-tenant environments or cloud deployments where a single malicious response can starve resources for other workloads. Incident response teams should assess whether affected deployments download from external or user-controlled sources.

Affected systems

The vulnerability is confirmed in urllib3 version 2.6.3 with Brotli 1.2.0 support enabled. Any Python application or library using urllib3 2.6.3 in streaming mode (`preload_content=False`) with Brotli decompression is in scope. The popular `requests` library, when used with urllib3 2.6.3, inherits this risk if requests are made to untrusted endpoints. Verify your urllib3 version with `pip show urllib3` and check whether Brotli support is installed via `pip show brotli`. Applications using only gzip or deflate compression, or those with urllib3 versions prior to 2.6.3 or after a patched release, are not affected by this specific flaw.

Exploitability

Exploitation requires no authentication and no user interaction. An attacker must control or compromise the HTTP endpoint from which the target application retrieves data. The attack is straightforward: craft a Brotli-compressed response with a legitimate compression header and high compression ratio. No client-side exploit code or unusual request patterns are needed. The barrier to exploitation is network position—the attacker must be able to serve or intercept HTTP responses. Given the simplicity of the attack surface and the lack of client-side complexity, this is a network-accessible vulnerability with low technical barriers.

Remediation

Patch urllib3 to a version released after 2026-06-22 that addresses the three code path bypasses. Coordinate with your dependency manager to ensure the patched version is deployed. If immediate patching is not feasible, disable Brotli decompression by uninstalling the `brotli` package (fallback to gzip/deflate is automatic), or configure applications to avoid streaming mode (`preload_content=True`) when consuming data from less-trusted sources, though this increases memory overhead. For long-term resilience, implement explicit decompression limits in application code and monitor streaming responses for unexpectedly large decompressed sizes.

Patch guidance

Monitor the urllib3 project repository and PyPI for a patched release addressing CVE-2026-9375. Apply patches to all Python environments where urllib3 2.6.3 is installed. Test the patched version in development before production deployment to ensure compatibility with your application's HTTP behavior. If you maintain downstream libraries that depend on urllib3, coordinate with your users to upgrade. Verify the patch by checking that the three identified code paths—`read()` buffer arithmetic, `flush_decoder()` max_length override, and `_flush_decoder()` limit parameter—are corrected in the release notes.

Detection guidance

Look for urllib3 version 2.6.3 in dependency logs and container images. Check application logs for out-of-memory errors or crashes coinciding with HTTP requests to external endpoints, particularly if those endpoints deliver Brotli-compressed responses. Use static analysis to identify calls to `response.read()` or `response.stream()` with `preload_content=False` in your codebase. Monitor process memory usage during streaming downloads; unusual spikes without corresponding application logic may indicate decompression bomb activity. SIEM rules can flag HTTP responses with atypical compression ratios or unusually large decompressed sizes relative to Content-Length headers.

Why prioritize this

This vulnerability merits immediate attention despite the requirement for network position because: (1) the attack surface is broad—any streaming HTTP client is in scope, (2) the exploitation is trivial and requires no sophisticated tooling, (3) the impact is severe and cascading (DoS can bring down services), and (4) urllib3 is ubiquitous in Python ecosystems, affecting many organizations transitively through requests or other libraries. Organizations downloading from external APIs, webhooks, or user-uploaded content should prioritize patching.

Risk score, explained

The CVSS 3.0 score of 7.5 (HIGH) reflects a network-accessible vulnerability with no authentication, low complexity, and direct availability impact. The score appropriately captures the severity of a remote crash condition but does not account for the requirement that the attacker control the HTTP endpoint. In practice, the risk is elevated for applications consuming data from untrusted sources but lower for internal-only HTTP communication. Prioritize patching based on whether your applications make streaming requests to external, user-controlled, or compromisable endpoints.

Frequently asked questions

Does this vulnerability affect urllib3 2.6.0 through 2.6.2?

No. CVE-2026-9375 is specific to version 2.6.3. Version 2.6.0 introduced the `max_length` protection for decompression bombs; version 2.6.3 reintroduced the bypass through three code paths. Earlier and later versions require assessment against their specific patches.

If I use requests but don't explicitly use Brotli, am I affected?

If Brotli is installed on your system and a server sends a Brotli-compressed response, urllib3 will use it. Uninstalling the `brotli` package removes the risk from this specific vulnerability. However, we recommend patching rather than uninstalling, as Brotli support is increasingly standard.

Does setting a timeout on requests protect against this attack?

No. A timeout limits how long the application waits for a response; it does not limit decompression. A malicious server can send a slowly decompressing payload that stays within the timeout window while consuming memory. You need an explicit decompression size limit, which the patch addresses.

What if I only use gzip compression?

This vulnerability is specific to Brotli. Gzip and deflate decoders in urllib3 2.6.3 are not bypassed by the identified code paths. However, verify that your servers or clients are not transparently switching to Brotli without your knowledge.

This intelligence is current as of the published date and reflects publicly available information about CVE-2026-9375. Patch availability, vendor timelines, and exploitation prevalence may evolve. Always verify patch version numbers and compatibility against the official urllib3 project and your environment's package managers. This analysis does not constitute a substitute for a formal risk assessment tailored to your infrastructure and threat model. Test patches in non-production environments before deployment. SEC.co makes no warranty regarding the accuracy or completeness of this analysis; refer to official vendor advisories for definitive guidance. Source: NVD (public-domain), retrieved 2026-07-29. Analysis generated by SEC.co (claude-haiku-4-5).