CVE-2024-37891
Proxy-Authorization request header isn't stripped during cross-origin redirects in urllib3
Reported by github_m · Published June 17, 2024
urllib3 is fixed in 2.2.2 and 1.26.19 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| urllib3 | PyPI | 2.2.2, 1.26.19 |
| kubeflow-volumes-web-app | Wolfi | 1.8.0-r7 |
| py3.9-torchvision-cuda-12.3 | Chainguard | 0.18.1-r2 |
| py3-urllib3-1 | Wolfi | 1.26.19-r0 |
| python3-urllib3 | Amazon Linux | 1.25.10-5.amzn2023.0.4, 1.25.6-2.amzn2.0.4 |
| python2-pip | Amazon Linux | 20.2.2-1.amzn2.0.6 |
| py3-urllib3 | Chainguard | 2.2.2-r0 |
| kubeflow-katib | Wolfi | 0.18.0-r0 |
| datadog-agent | Chainguard | 7.55.2-r0 |
| airflow | Chainguard | 2.9.2-r1 |
| ggshield | Chainguard | 1.28.0-r0 |
| python3-pip | Amazon Linux | 20.2.2-1.amzn2.0.6 |
46 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| urllib3 | urllib3 | < 1.26.19, >= 2.0.0, < 2.2.2 |
| wolfi | kubeflow-volumes-web-app | 0 |
| chainguard | py3.9-torchvision-cuda-12.3 | 0 |
| wolfi | py3-urllib3-1 | 0 |
| amazon:2 | python3-urllib3 | 0 |
| amazon:2 | python2-pip | 0 |
| chainguard | py3-urllib3 | 0 |
| wolfi | kubeflow-katib | 0 |
| chainguard | datadog-agent | 0 |
| chainguard | airflow | 0 |
| chainguard | ggshield | 0 |
| amazon:2 | python3-pip | 0 |
| wolfi | airflow | 0 |
| chainguard | py3.11-torchvision-cuda-12.3 | 0 |
| chainguard | reflex | 0 |
| wolfi | superset | 0 |
| wolfi | datadog-agent | 0 |
| amazon:2023 | python3.11-pip-wheel | 0 |
| chainguard | mlflow | 0 |
| wolfi | kubeflow-pipelines-visualization-server | 0 |
…and 66 more
Timeline
- Jun 17, 2024 CVE Published
- Jun 18, 2024 EPSS Score (30 in total, the first dated here)
- Jul 3, 2024 PoC Published
- Oct 4, 2024 Coalition ESS Score (10 in total, the first dated here)
- Jan 9, 2026 Security Advisory (88 in total, the first dated here)
- Aug 10, 2026 Distribution Patch (76 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-37891
vulnetix vdb fixes CVE-2024-37891
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-37891/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/urllib3/urllib3/security/advisories/GHSA-34jh-p97f-mpxf x_refsource_CONFIRM
- https://github.com/urllib3/urllib3/commit/accff72ecc2f6cf5a76d9570198a93ac7c90270e x_refsource_MISC
- https://www.vicarius.io/vsociety/posts/proxy-authorization-header-handling-vulnerability-in-urllib3-cve-2024-37891 url
- https://security.netapp.com/advisory/ntap-20240822-0003/ url
- https://lists.debian.org/debian-lts-announce/2024/12/msg00020.html url
- https://nvd.nist.gov/vuln/detail/CVE-2024-37891 advisory
- https://github.com/advisories/GHSA-34jh-p97f-mpxf advisory
- https://github.com/urllib3/urllib3/commit/40b6d1605814dd1db0a46e202d6e56f2e4c9a468 patch
- https://github.com/urllib3/urllib3 url
- https://security.netapp.com/advisory/ntap-20240822-0003 advisory