---
schema_version: '1.0'
id: security-20260812-1980a0
title: 'CVE-2025-66418: urllib3 allows an unbounded number of links in the decompression
  chain'
url: https://osv.dev/vulnerability/PYSEC-2026-1998
url_hash: 1980a0e127c025191fe9029a10a4f68553da48f23caf40299ffeabd0c27c8f25
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-1998
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2025-66418
- PYSEC-2026-1998
- severity:CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H
- urllib3
- PyPI
lang: en
published_at: '2026-07-07T16:03:12Z'
fetched_at: '2026-08-12T16:00:04.906727Z'
updated_at: '2026-08-22T14:53:01Z'
status: published
content_hash: bc1efaefc29ca4ee9c472c46be8922922b7719e5c72983c32f29e4ba9b807632
content_changed_at: '2026-08-22T13:15:22.099131Z'
license_note: full
summary: urllib3 allows an unbounded number of links in the decompression chain
summary_source: rss
summary_en: urllib3 allows an unbounded number of links in the decompression chain
summary_omitted_reason: null
redistribution: true
keywords_en:
- allows
- chain
- CVE
- CVE-2025-66418
- decompression
- library vulnerability
- links
- number
- Number Web
- PyPI
- PYSEC-2026-1998
- severity:CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H
- software security
- Swallows Wings Square
- the
- unbounded
- urllib3
entities_en:
- name: CVE
  type: data
- name: Number Web
  type: organization
- name: PyPI
  type: artifact
- name: Swallows Wings Square
  type: location
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
- name: PyPI
  type: artifact
- name: Swallows Wings Square
  type: location
- name: Number Web
  type: organization
related_auto:
- name: Portal
  type: organization
  weight: 1.0
- name: Hugging Face
  type: organization
  weight: 1.0
- name: ヤクルト
  type: organization
  weight: 1.0
- name: 関東鉄道株式会社
  type: organization
  weight: 1.0
computed_at: '2026-08-22T14:52:59Z'
---

# CVE-2025-66418: urllib3 allows an unbounded number of links in the decompression chain

## TL;DR
urllib3 allows an unbounded number of links in the decompression chain

## Key Points
- cve / CVE-2025-66418 / PYSEC-2026-1998 / severity:CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H / urllib3 / PyPI

## Details
**Severity:** CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H
**Advisory:** PYSEC-2026-1998 (CVE-2025-66418)

**Details:**
## Impact

urllib3 supports chained HTTP encoding algorithms for response content according to RFC 9110 (e.g., `Content-Encoding: gzip, zstd`).

However, the number of links in the decompression chain was unbounded allowing a malicious server to insert a virtually unlimited number of compression steps leading to high CPU usage and massive memory allocation for the decompressed data.


## Affected usages

Applications and libraries using urllib3 version 2.5.0 and earlier for HTTP requests to untrusted sources unless they disable content decoding explicitly.


## Remediation

Upgrade to at least urllib3 v2.6.0 in which the library limits the number of links to 5.

If upgrading is not immediately possible, use [`preload_content=False`](https://urllib3.readthedocs.io/en/2.5.0/advanced-usage.html#streaming-and-i-o) and ensure that `resp.headers["content-encoding"]` contains a safe number of encodings before reading the response content.

**References:**
- https://github.com/urllib3/urllib3/security/advisories/GHSA-gm62-xv2j-4w53
- https://nvd.nist.gov/vuln/detail/CVE-2025-66418
- https://github.com/urllib3/urllib3/commit/24d7b67eac89f94e11003424bcf0d8f7b72222a8
- https://github.com/urllib3/urllib3
- https://pypi.org/project/urllib3
- https://github.com/advisories/GHSA-gm62-xv2j-4w53

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

## Source
元記事: [CVE-2025-66418: urllib3 allows an unbounded number of links in the decompression chain](https://osv.dev/vulnerability/PYSEC-2026-1998) — published 2026-07-07T16:03:12Z
