CVE-2025-50181 — Vulnerability in urllib3 — CVE Details
urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.58%). Schedule for your next planned update.
Does your project use an affected urllib3 version?
Paste your requirements.txt to check it for CVE-2025-50181 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
urllib3 handles redirects and retries using the same mechanism, which is controlled by the Retry object. The most common way to disable redirects is at the request level, as follows:
resp = urllib3.request("GET", "https://httpbin.org/redirect/1", redirect=False)
print(resp.status)
# 302
However, it is also possible to disable redirects, for all requests, by instantiating a PoolManager and specifying retries in a way that disable redirects:
import urllib3
http = urllib3.PoolManager(retries=0) # should raise MaxRetryError on redirect
http = urllib3.PoolManager(retries=urllib3.Retry(redirect=0)) # equivalent to the above
http = urllib3.PoolManager(retries=False) # should return the first response
resp = http.request("GET", "https://httpbin.org/redirect/1")
However, the retries parameter is currently ignored, which means all the above examples don't disable redirects.
Affected usages
Passing retries on PoolManager instantiation to disable redirects or restrict their number.
By default, requests and botocore users are not affected.
Impact
Redirects are often used to exploit SSRF vulnerabilities. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects at the PoolManager level will remain vulnerable.
Remediation
You can remediate this vulnerability with the following steps:
- Upgrade to a patched version of urllib3. If your organization would benefit from the continued support of urllib3 1.x, please contact sethmichaellarson@gmail.com to discuss sponsorship or contribution opportunities.
- Disable redirects at the
request()level instead of thePoolManager()level.
Advisory Timeline
- First published June 18, 2025 (526 days ago).
- Last revised September 10, 2026 — 448 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "urllib3>=2.5.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| urllib3 PyPI · Affected: 0.2, 0.3, 0.3.1, 0.4.0 (+98 more) | 2.5.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-601Open RedirectMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
References
- https://github.com/urllib3/urllib3/security/advisories/GHSA-pq67-6m6q-mj2vWEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-50181ADVISORY
- https://github.com/urllib3/urllib3/commit/f05b1329126d5be6de501f9d1e3e36738bc08857WEB
- https://github.com/urllib3/urllib3PACKAGE
- https://github.com/urllib3/urllib3/releases/tag/2.5.0WEB
Frequently Asked Questions
- What is CVE-2025-50181?
- urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
- How do I check if my project is affected by CVE-2025-50181?
- CVE-2025-50181 affects urllib3. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-50181 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 41.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-97687HIGH
urllib3: HTTPS proxy TLS configuration may be ignored or overridden
- CVE-2026-97689HIGH
urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory
- CVE-2025-66471HIGH
urllib3 streaming API improperly handles highly compressed data
- CVE-2026-21441HIGH
Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)
- CVE-2026-97687HIGH
urllib3: HTTPS proxy TLS configuration may be ignored or overridden
- CVE-2026-97688MEDIUM
urllib3: Chunked Deflate streaming can enter an infinite loop
- CVE-2024-37891MEDIUM
urllib3's Proxy-Authorization request header isn't stripped during cross-origin redirects
- CVE-2023-45803MEDIUM
urllib3's request body not stripped after redirect from 303 status changes request method to GET