Summary
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.
Impact
CVE-2023-43804 has a CVSS score of 5.9 (High). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.0.6, 1.26.17); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
- Upgrading to at least urllib3 v1.26.17 or v2.0.6
- Disabling HTTP redirects using
redirects=Falsewhen sending requests. - Not using the
Cookieheader.
Frequently Asked Questions
- What is CVE-2023-43804? CVE-2023-43804 is a high-severity security vulnerability in urllib3 (pip), affecting versions >= 2.0.0, < 2.0.6. It is fixed in 2.0.6, 1.26.17.
- How severe is CVE-2023-43804? CVE-2023-43804 has a CVSS score of 5.9 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of urllib3 are affected by CVE-2023-43804? urllib3 (pip) versions >= 2.0.0, < 2.0.6 is affected.
- Is there a fix for CVE-2023-43804? Yes. CVE-2023-43804 is fixed in 2.0.6, 1.26.17. Upgrade to this version or later.
- Is CVE-2023-43804 exploitable, and should I be worried? Whether CVE-2023-43804 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2023-43804 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2023-43804?
- Upgrade
urllib3to 2.0.6 or later - Upgrade
urllib3to 1.26.17 or later
- Upgrade