urllib3 allows an unbounded number of links in the decompression chain
Published 5 Dec 2025 · Updated 10 Sept 2026
Is your project on an affected urllib3?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- >=1.24 <2.6.0
- Fixed in
- 2.6.0
pip install 'urllib3>=2.6.0'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` and ensure that resp.headers["content-encoding"] contains a safe number of encodings before reading the response content.
Is GHSA-gm62-xv2j-4w53 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-2026-21441Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API) · 7 Jan 2026
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.