`Cookie` HTTP header isn't stripped on cross-origin redirectsGHSA-v845-jxx5-vc9f
MEDIUMFix: urllib3/urllib3@0122035GHSA-v845-jxx5-vc9f is a medium-severity (CVSS 5.9) Information Exposure vulnerability in urllib3. A fix is available for urllib3 — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-v845-jxx5-vc9f by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
urllib3🐍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 doesn't treat the Cookie HTTP header special or provide any helpers for managing cookies over HTTP, that is the responsibility of the user. However, it is possible for a user to specify a Cookie header and unknowingly leak information via HTTP redirects to a different origin if that user doesn't disable redirects explicitly.
Users must handle redirects themselves instead of relying on urllib3's automatic redirects to achieve safe processing of the Cookie header, thus we decided to strip the header by default in order to further protect users who aren't using the correct approach.
Affected usages
We believe the number of usages affected by this advisory is low. It requires all of the following to be true to be exploited:
- Using an affected version of urllib3 (patched in v1.26.17 and v2.0.6)
- Using the
Cookieheader on requests, which is mostly typical for impersonating a browser. - Not disabling HTTP redirects
- Either not using HTTPS or for the origin server to redirect to a malicious origin.
Remediation
- Upgrading to at least urllib3 v1.26.17 or v2.0.6
- Disabling HTTP redirects using
redirects=Falsewhen sending requests. - Not using the
Cookieheader.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | urllib3 | ≥ 2.0.0&&< 2.0.6 | 2.0.6pip install --upgrade 'urllib3==2.0.6' |
| 🐍PyPI | urllib3 | all versions | 1.26.17pip install --upgrade 'urllib3==1.26.17' |
Affected Products
debian linuxdebianfedorafedoraprojecturllib3pythonDetection & 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.0.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-v845-jxx5-vc9f is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
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.
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 GHSA-v845-jxx5-vc9f (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ansible Automation Platform 2.4 for RHEL 8 | python3x-urllib3-0:1.26.18-1.el8ap | RHSA-2023:6158 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 8 | automation-controller-0:4.5.1-1.el8ap | RHSA-2024:0733 |
| Red Hat Enterprise Linux 8 | fence-agents-0:4.2.1-121.el8_9.2 | RHSA-2024:0133 |
| Red Hat Enterprise Linux 8 | python39:3.9-8100020240214182535.7044f6c1 | RHSA-2024:2985 |
| Red Hat Enterprise Linux 8 | python3.11-urllib3-0:1.26.12-2.el8 | RHSA-2024:2986 |
| Red Hat Enterprise Linux 8 | python27:2.7-8100020240208011952.5f0f67de | RHSA-2024:2987 |
| Red Hat Enterprise Linux 8 | python-urllib3-0:1.24.2-5.el8_9.2 | RHSA-2024:0116 |
| Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions | fence-agents-0:4.2.1-30.el8_1.10 | RHSA-2023:6812 |
Frequently Asked Questions
Is GHSA-v845-jxx5-vc9f in your dependencies?
Find it across PyPI, including transitive dependencies.