CVE-2024-37891 Proxy-Authorization request header isn't stripped during cross-origin redirects in urllib3

Medium 4.4 Published Updated

Attackers can steal Proxy-Authorization credentials if users manually set the header without using built-in proxy support during cross-origin redirects.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-37891?

CVE-2024-37891 is a medium-severity vulnerability in Debian Debian Linux, published on 17 Jun 2024. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

urllib3 is a user-friendly HTTP client library for Python. 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. We believe the number of usages affected by this advisory is low. It requires all of the following to be true to be exploited: 1. Setting the `Proxy-Authorization` header without using urllib3's built-in proxy support. 2. Not disabling HTTP redirects. 3. Either not using an HTTPS origin server or for the proxy or target origin to redirect to a malicious origin. Users are advised to update to either version 1.26.19 or version 2.2.2. Users unable to upgrade may use the `Proxy-Authorization` header with urllib3's `ProxyManager`, disable HTTP redirects using `redirects=False` when sending requests, or not user the `Proxy-Authorization` header as mitigations.

Weakness: CWE-669

Which versions are affected by CVE-2024-37891?

5 open source packages ship an affected version, including urllib3. It affects 3 products.

PackageAffectedFixed in
urllib3 PyPIAll versions1.26.19, 2.2.2
urllib3 PyPIAll versions1.26.19
urllib3 PyPIAll versions1.26.19
urllib3 PyPIFrom 2.0.02.2.2
urllib3 PyPIFrom 2.0.02.2.2
Linux distribution packages (35)
python3-urllib3 AlmaLinux:8All versions1.24.2-8.el8_10
python3.11-urllib3 AlmaLinux:8All versions1.26.12-4.el8_10
python3.12-urllib3 AlmaLinux:8All versions1.26.19-1.el8_10
fence-agents-aliyun AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-all AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-amt-ws AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-apc AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-apc-snmp AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-aws AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-azure-arm AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-bladecenter AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-brocade AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-cisco-mds AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-cisco-ucs AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-common AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-compute AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-drac5 AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-eaton-snmp AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-emerson AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-eps AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-gce AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-heuristics-ping AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-hpblade AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ibm-powervs AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ibm-vpc AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ibmblade AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ifmib AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ilo-moonshot AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ilo-mp AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ilo-ssh AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ilo2 AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-intelmodular AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ipdu AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-ipmilan AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1
fence-agents-kdump AlmaLinux:9All versions4.10.0-62.el9_4.4.alma.1

Products include Debian Debian Linux, Netapp Active Iq Unified Manager, Python Urllib3.

How do I fix CVE-2024-37891?

Upgrade urllib3 to a fixed version for your release line: 1.26.19 or 2.2.2.

Is CVE-2024-37891 being exploited?

There is no known exploitation of CVE-2024-37891 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALSA-2024:4422, ALSA-2024:5309, ALSA-2024:6162, ALSA-2024:8842, ALSA-2024:8843, ALSA-2024:9457 and 56 more.

Is CVE-2024-37891 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free