CVE-2025-50181 is a medium-severity (CVSS 5.3) Open Redirect vulnerability in urllib3. A fix is available for urllib3 — see the affected versions and patch details below.
urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-50181.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
urllib3Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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 [email protected] to discuss sponsorship or contribution opportunities.
- Disable redirects at the
request()level instead of thePoolManager()level.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | urllib3 | all versions | 2.5.0pip install --upgrade 'urllib3==2.5.0' |
Affected Products
urllib3pythonDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for urllib3, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update urllib3 to 2.5.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-50181 is resolved across your whole dependency graph.
Workarounds
Stop reflecting attacker-controlled destinations: resolve every redirect target against an allowlist of paths or hosts you own, prefer a server-side key over a full URL in the request, and reject absolute URLs entirely where the flow only ever needs a relative one.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A flaw was found in the urllib3 library where it could be tricked into disclosing the Proxy-Authorization header to a destination server when a CONNECT tunnel is used. An attacker can set up a malicious redirect to a crafted URL, which, when followed by the client application, will cause the Proxy-Authorization header…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for CVE-2025-50181 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ceph Storage 7.1 | rhceph/grafana-rhel9:1781855851 | RHSA-2026:33154 |
| Red Hat Ceph Storage 7.1 | rhceph/grafana-rhel9:1791450715 | RHSA-2026:83548 |
| Red Hat Ceph Storage 8.1 | rhceph/grafana-rhel9:1787305054 | RHSA-2026:62115 |
| Red Hat Ceph Storage 9 | rhceph/grafana-rhel10:1771399331 | RHSA-2026:3406 |
| Red Hat Ceph Storage 9.2 | rhceph/rhceph-9-rhel10:1790843527 | RHSA-2026:86618 |
| Red Hat Quay 3.14 | quay/quay-rhel8:1773097621 | RHSA-2026:4215 |
Frequently Asked Questions
Is CVE-2025-50181 in your dependencies?
Find it across PyPI, including transitive dependencies.