CVE-2018-25091 is a medium-severity (CVSS 6.1) Open Redirect vulnerability in urllib3. A fix is available for urllib3 — see the affected versions and patch details below.
Authorization Header forwarded on redirect
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-2018-25091.
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 before 1.24.2 does not remove the authorization HTTP header when following a cross-origin redirect (i.e., a redirect that differs in host, port, or scheme). This can allow for credentials in the authorization header to be exposed to unintended hosts or transmitted in cleartext. NOTE: this issue exists because of an incomplete fix for CVE-2018-20060 (which was case-sensitive).
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | urllib3 | all versions | 1.24.2pip install --upgrade 'urllib3==1.24.2' |
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 1.24.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2018-25091 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.
This is only exploitable if a redirect differs in host, port, or scheme. Due to the credential exposure in the authorization header, the confidentiality is highly impacted, but there is no proof that the integrity is affected in any way.
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-2018-25091 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 8 | container-tools:rhel8-8100020240227110532.82888897 | RHSA-2024:2988 |
Frequently Asked Questions
Is CVE-2018-25091 in your dependencies?
Find it across PyPI, including transitive dependencies.