PyPI: urllib3
CVE-2025-50181
Safety vulnerability ID: SFTY-20250620-79595
Safety legacy ID: pyup.io-77744
urllib3 is a user-friendly HTTP client library for Python. Prior to 2.5.0, it is possible to disable redirects for all requests by instantiating a PoolManager and specifying retries in a way that disable redirects. By default, requests and botocore users are not affected. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects at the PoolManager level will remain vulnerable. This issue has been patched in version 2.5.0.
Overview
urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation
Advisory
urllib3 is a user-friendly HTTP client library for Python. Prior to 2.5.0, it is possible to disable redirects for all requests by instantiating a PoolManager and specifying retries in a way that disable redirects. By default, requests and botocore users are not affected. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects at the PoolManager level will remain vulnerable. This issue has been patched in version 2.5.0.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20250620-79595/CVE-2025-50181
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-50181
- https://github.com/advisories/GHSA-pq67-6m6q-mj2v
- https://github.com/urllib3/urllib3/commit/f05b1329126d5be6de501f9d1e3e36738bc08857
- https://github.com/urllib3/urllib3/security/advisories/GHSA-pq67-6m6q-mj2v
- https://github.com/urllib3/urllib3/commit/f05b1329126d5be6de501f9d1e3e36738bc08857
- https://nvd.nist.gov/vuln/detail/CVE-2025-50181
- https://github.com/urllib3/urllib3/releases/tag/2.5.0
- https://github.com/advisories/GHSA-pq67-6m6q-mj2v
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
