CVE-2025-50182: Urllib3 Urllib3 Does Not Control Redirects Vulnerability
MODERATECVE-2025-50182 is a MODERATE (CVSS 5.3) urllib3 does not control redirects vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Urllib3 libraries in the PyPI ecosystem. The issue involves urllib3 does not control redirects in browsers and node.js. Remediation is available by upgrading affected packages to version 2.5.0.
CVE-2025-50182 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-50182
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-50182, 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-50182 Affected Urllib3 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
urllib3
|
PyPI |
≥ 2.2.0
< 2.5.0
|
2.5.0
|
References
Frequently Asked Questions
What is CVE-2025-50182?
Which Urllib3 versions are affected?
What version fixes CVE-2025-50182?
Is urllib3 affected?
What is the CVSS score of CVE-2025-50182?
What CWE is associated with CVE-2025-50182?
How can I check PyPI dependencies for CVE-2025-50182?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-48p4-8xcf-vxj5",
"modified" : "2025-12-22T18:43:35Z",
"published" : "2025-06-18T17:50:11Z",
"aliases" : [ "CVE-2025-50182" ],
"summary" : "urllib3 does not control redirects in browsers and Node.js",
"details" : "urllib3 [supports](https://urllib3.readthedocs.io/en/2.4.0/reference/contrib/emscripten.html) being used in a Pyodide runtime utilizing the [JavaScript Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) or falling back on [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). This means you can use Python libraries to make HTTP requests from your browser or Node.js. Additionally, urllib3 provides [a mechanism](https://urllib3.readthedocs.io/en/2.4.0/user-guide.html#retrying-requests) to control redirects.\n\nHowever, the `retries` and `redirect` parameters are ignored with Pyodide; the runtime itself determines redirect behavior.\n\n\n## Affected usages\n\nAny code which relies on urllib3 to control the number of redirects for an HTTP request in a Pyodide runtime.\n\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 may remain vulnerable if a Pyodide runtime redirect mechanism is unsuitable.\n\n\n## Remediation\n\nIf you use urllib3 in Node.js, upgrade to a patched version of urllib3.\n\nUnfortunately, 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.",
"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" : "2.2.0"
}, {
"fixed" : "2.5.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/urllib3/urllib3/security/advisories/GHSA-48p4-8xcf-vxj5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-50182"
}, {
"type" : "WEB",
"url" : "https://github.com/urllib3/urllib3/commit/7eb4a2aafe49a279c29b6d1f0ed0f42e9736194f"
}, {
"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:11Z",
"nvd_published_at" : "2025-06-19T02:15:17Z"
}
}