CVE-2024-37891

CVE-2024-37891 is a medium-severity security vulnerability in urllib3 (pip), affecting versions < 1.26.19. It is fixed in 1.26.19, 2.2.2.

Summary

When using urllib3's proxy support with ProxyManager, the Proxy-Authorization header is only sent to the configured proxy, as expected.

However, when sending HTTP requests without using urllib3's proxy support, it's possible to accidentally configure the Proxy-Authorization header even though it won't have any effect as the request is not using a forwarding proxy or a tunneling proxy. In those cases, urllib3 doesn't treat the Proxy-Authorization HTTP header as one carrying authentication material and thus doesn't strip the header on cross-origin redirects.

Because this is a highly unlikely scenario, we believe the severity of this vulnerability is low for almost all users. Out of an abundance of caution urllib3 will automatically strip the Proxy-Authorization header during cross-origin redirects to avoid the small chance that users are doing this on accident.

Users should use urllib3's proxy support or disable automatic redirects to achieve safe processing of the Proxy-Authorization header, but we still 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:

  • Setting the Proxy-Authorization header without using urllib3's built-in proxy support.
  • Not disabling HTTP redirects.
  • Either not using an HTTPS origin server or for the proxy or target origin to redirect to a malicious origin.

Impact

CVE-2024-37891 has a CVSS score of 4.4 (Medium). 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 (1.26.19, 2.2.2); upgrading removes the vulnerable code path.

Affected versions

urllib3 (< 1.26.19) urllib3 (>= 2.0.0, < 2.2.2)

Security releases

urllib3 → 1.26.19 (pip) urllib3 → 2.2.2 (pip)

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.

See it in your environment

Remediation advice

  • Using the Proxy-Authorization header with urllib3's ProxyManager.
  • Disabling HTTP redirects using redirects=False when sending requests.
  • Not using the Proxy-Authorization header.

Frequently Asked Questions

  1. What is CVE-2024-37891? CVE-2024-37891 is a medium-severity security vulnerability in urllib3 (pip), affecting versions < 1.26.19. It is fixed in 1.26.19, 2.2.2.
  2. How severe is CVE-2024-37891? CVE-2024-37891 has a CVSS score of 4.4 (Medium). 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.
  3. Which versions of urllib3 are affected by CVE-2024-37891? urllib3 (pip) versions < 1.26.19 is affected.
  4. Is there a fix for CVE-2024-37891? Yes. CVE-2024-37891 is fixed in 1.26.19, 2.2.2. Upgrade to this version or later.
  5. Is CVE-2024-37891 exploitable, and should I be worried? Whether CVE-2024-37891 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
  6. What actually determines whether CVE-2024-37891 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.
  7. How do I fix CVE-2024-37891?
    • Upgrade urllib3 to 1.26.19 or later
    • Upgrade urllib3 to 2.2.2 or later

Other vulnerabilities in urllib3

CVE-2026-44432CVE-2026-44431CVE-2026-21441CVE-2025-66471CVE-2025-66418

Stop the waste.
Protect your environment with Kodem.