urllib3 does not control redirects in browsers and Node.js
Published 18 Jun 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
- >=2.2.0 <2.5.0
- Fixed in
- 2.5.0
pip install 'urllib3>=2.5.0'Details
urllib3 supports being used in a Pyodide runtime utilizing the JavaScript Fetch API or falling back on XMLHttpRequest. This means you can use Python libraries to make HTTP requests from your browser or Node.js. Additionally, urllib3 provides a mechanism to control redirects.
However, the retries and redirect parameters are ignored with Pyodide; the runtime itself determines redirect behavior.
Affected usages
Any code which relies on urllib3 to control the number of redirects for an HTTP request in a Pyodide runtime.
Impact
Redirects are often used to exploit SSRF vulnerabilities. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects may remain vulnerable if a Pyodide runtime redirect mechanism is unsuitable.
Remediation
If you use urllib3 in Node.js, upgrade to a patched version of urllib3.
Unfortunately, browsers provide no suitable way which urllib3 can use: XMLHttpRequest provides no control over redirects, the Fetch API returns opaqueredirect responses lacking data when redirects are controlled manually. Expect default browser behavior for redirects.
Is GHSA-48p4-8xcf-vxj5 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.