---
schema_version: '1.0'
id: security-20260812-901942
title: 'CVE-2025-66418: urllib3 allows an unbounded number of links in the decompression
  chain'
url: https://osv.dev/vulnerability/GHSA-gm62-xv2j-4w53
url_hash: 901942f236995dfa6d2c7bfd5338b9b505aac1c0b7b9142539ff50901d08988d
canonical_url: https://osv.dev/vulnerability/GHSA-gm62-xv2j-4w53
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2025-66418
- GHSA-gm62-xv2j-4w53
- 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: '2025-12-05T18:15:19Z'
fetched_at: '2026-08-12T16:00:04.891574Z'
updated_at: '2026-08-22T14:53:01Z'
status: published
content_hash: 00dfa8804e6d60c41f7963635207754066d51ed65517e21a8a1c21be555d7ca9
content_changed_at: '2026-08-22T13:15:22.082102Z'
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
- GHSA-gm62-xv2j-4w53
- library vulnerability
- links
- number
- Number Web
- PyPI
- 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:58Z'
---

# 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 / GHSA-gm62-xv2j-4w53 / 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:** GHSA-gm62-xv2j-4w53 (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

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-gm62-xv2j-4w53_

## Source
元記事: [CVE-2025-66418: urllib3 allows an unbounded number of links in the decompression chain](https://osv.dev/vulnerability/GHSA-gm62-xv2j-4w53) — published 2025-12-05T18:15:19Z
