CVE-2025-50181: Urllib3 Urllib3 Redirects Are Not Disabled Vulnerability
MODERATECVE-2025-50181 is a MODERATE (CVSS 5.3) urllib3 redirects are not disabled vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Urllib3 libraries in the PyPI ecosystem. The issue involves urllib3 redirects are not disabled when retries are disabled on poolmanager instantiation. Remediation is available by upgrading affected packages to version 2.5.0.
CVE-2025-50181 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2025-50181
To remediate this vulnerability, upgrade all affected Urllib3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install urllib3>=2.5.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show urllib3
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-50181, inspect your installed packages using pip:
pip show urllib3
Analyze the terminal output to locate any version of Urllib3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.0), your application is affected.
Note: The pip show urllib3 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Urllib3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-50181 Affected Urllib3 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
urllib3
|
PyPI |
< 2.5.0
|
2.5.0
|
References
Frequently Asked Questions
What is CVE-2025-50181?
Which Urllib3 versions are affected?
What version fixes CVE-2025-50181?
Is urllib3 affected?
What is the CVSS score of CVE-2025-50181?
What CWE is associated with CVE-2025-50181?
How can I check PyPI dependencies for CVE-2025-50181?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pq67-6m6q-mj2v",
"modified" : "2025-12-22T21:33:21Z",
"published" : "2025-06-18T17:50:00Z",
"aliases" : [ "CVE-2025-50181" ],
"summary" : "urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation",
"details" : "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:\n\n```python\nresp = urllib3.request(\"GET\", \"https://httpbin.org/redirect/1\", redirect=False)\nprint(resp.status)\n# 302\n```\n\nHowever, it is also possible to disable redirects, for all requests, by instantiating a `PoolManager` and specifying `retries` in a way that disable redirects:\n\n```python\nimport urllib3\n\nhttp = urllib3.PoolManager(retries=0) # should raise MaxRetryError on redirect\nhttp = urllib3.PoolManager(retries=urllib3.Retry(redirect=0)) # equivalent to the above\nhttp = urllib3.PoolManager(retries=False) # should return the first response\n\nresp = http.request(\"GET\", \"https://httpbin.org/redirect/1\")\n```\n\nHowever, the `retries` parameter is currently ignored, which means all the above examples don't disable redirects.\n\n## Affected usages\n\nPassing `retries` on `PoolManager` instantiation to disable redirects or restrict their number.\n\nBy default, requests and botocore users are not affected.\n\n## Impact\n\nRedirects 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.\n\n## Remediation\n\nYou can remediate this vulnerability with the following steps:\n\n * 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](mailto:sethmichaellarson@gmail.com) to discuss sponsorship or contribution opportunities.\n * Disable redirects at the `request()` level instead of the `PoolManager()` level.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "urllib3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.5.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/urllib3/urllib3/security/advisories/GHSA-pq67-6m6q-mj2v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-50181"
}, {
"type" : "WEB",
"url" : "https://github.com/urllib3/urllib3/commit/f05b1329126d5be6de501f9d1e3e36738bc08857"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/urllib3/urllib3"
}, {
"type" : "WEB",
"url" : "https://github.com/urllib3/urllib3/releases/tag/2.5.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-18T17:50:00Z",
"nvd_published_at" : "2025-06-19T01:15:24Z"
}
}