CVE-2023-32681 Unintended leak of Proxy-Authorization header in requests
The Requests library leaks Proxy-Authorization headers to destination servers during HTTPS redirects, allowing attackers to exfiltrate sensitive proxy credentials.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-32681?
CVE-2023-32681 is a medium-severity vulnerability in Fedoraproject Fedora, published on 26 May 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Requests is a HTTP library. Since Requests 2.3.0, Requests has been leaking Proxy-Authorization headers to destination servers when redirected to an HTTPS endpoint. This is a product of how we use `rebuild_proxies` to reattach the `Proxy-Authorization` header to requests. For HTTP connections sent through the tunnel, the proxy will identify the header in the request itself and remove it prior to forwarding to the destination server. However when sent over HTTPS, the `Proxy-Authorization` header must be sent in the CONNECT request as the proxy has no visibility into the tunneled request. This results in Requests forwarding proxy credentials to the destination server unintentionally, allowing a malicious actor to potentially exfiltrate sensitive information. This issue has been patched in version 2.31.0.
Weakness: CWE-200
Which versions are affected by CVE-2023-32681?
3 open source packages ship an affected version, including requests. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
requests PyPI | From 2.3.0 | 2.31.0 |
requests PyPI | From 2.3.0 | 2.31.0 |
requests PyPI | From 2.3.0 | 2.31.0 |
Linux distribution packages (37)
babel AlmaLinux:8 | All versions | 2.5.1-10.module_el8.6.0+2781+fed64c13 |
python-nose-docs AlmaLinux:8 | All versions | 1.3.7-31.module_el8.6.0+2781+fed64c13 |
python-psycopg2-doc AlmaLinux:8 | All versions | 2.7.5-8.module_el8.9.0+3640+8d3927b5 |
python-sqlalchemy-doc AlmaLinux:8 | All versions | 1.3.2-2.module_el8.6.0+2781+fed64c13 |
python2 AlmaLinux:8 | All versions | 2.7.18-15.module_el8.9.0+3674+85657c95.alma.1 |
python2-Cython AlmaLinux:8 | All versions | 0.28.1-7.module_el8.6.0+2781+fed64c13 |
python2-Cython AlmaLinux:8 | All versions | 0.28.1-7.module_el8.6.0+3162+01a09e5a |
python2-PyMySQL AlmaLinux:8 | All versions | 0.8.0-10.module_el8.6.0+2781+fed64c13 |
python2-attrs AlmaLinux:8 | All versions | 17.4.0-10.module_el8.6.0+2781+fed64c13 |
python2-babel AlmaLinux:8 | All versions | 2.5.1-10.module_el8.6.0+2781+fed64c13 |
python2-backports AlmaLinux:8 | All versions | 1.0-16.module_el8.6.0+2781+fed64c13 |
python2-backports AlmaLinux:8 | All versions | 1.0-16.module_el8.6.0+3162+01a09e5a |
python2-backports-ssl_match_hostname AlmaLinux:8 | All versions | 3.5.0.1-12.module_el8.6.0+2781+fed64c13 |
python2-bson AlmaLinux:8 | All versions | 3.7.0-1.module_el8.6.0+2781+fed64c13 |
python2-bson AlmaLinux:8 | All versions | 3.7.0-1.module_el8.6.0+3162+01a09e5a |
python2-chardet AlmaLinux:8 | All versions | 3.0.4-10.module_el8.6.0+2781+fed64c13 |
python2-coverage AlmaLinux:8 | All versions | 4.5.1-5.module_el8.9.0+3640+8d3927b5 |
python2-debug AlmaLinux:8 | All versions | 2.7.18-15.module_el8.9.0+3674+85657c95.alma.1 |
python2-devel AlmaLinux:8 | All versions | 2.7.18-15.module_el8.9.0+3674+85657c95.alma.1 |
python2-dns AlmaLinux:8 | All versions | 1.15.0-10.module_el8.6.0+2781+fed64c13 |
python2-docs AlmaLinux:8 | All versions | 2.7.16-2.module_el8.6.0+2781+fed64c13 |
python2-docs-info AlmaLinux:8 | All versions | 2.7.16-2.module_el8.6.0+2781+fed64c13 |
python2-docutils AlmaLinux:8 | All versions | 0.14-12.module_el8.6.0+2781+fed64c13 |
python2-funcsigs AlmaLinux:8 | All versions | 1.0.2-13.module_el8.6.0+2781+fed64c13 |
python2-idna AlmaLinux:8 | All versions | 2.5-7.module_el8.6.0+2781+fed64c13 |
python2-ipaddress AlmaLinux:8 | All versions | 1.0.18-6.module_el8.6.0+2781+fed64c13 |
python2-jinja2 AlmaLinux:8 | All versions | 2.10-9.module_el8.6.0+2781+fed64c13 |
python2-libs AlmaLinux:8 | All versions | 2.7.18-15.module_el8.9.0+3674+85657c95.alma.1 |
python2-lxml AlmaLinux:8 | All versions | 4.2.3-6.module_el8.6.0+2781+fed64c13 |
python2-lxml AlmaLinux:8 | All versions | 4.2.3-6.module_el8.6.0+3162+01a09e5a |
python2-markupsafe AlmaLinux:8 | All versions | 0.23-19.module_el8.6.0+2781+fed64c13 |
python2-markupsafe AlmaLinux:8 | All versions | 0.23-19.module_el8.6.0+3162+01a09e5a |
python2-mock AlmaLinux:8 | All versions | 2.0.0-13.module_el8.6.0+2781+fed64c13 |
python2-nose AlmaLinux:8 | All versions | 1.3.7-31.module_el8.6.0+2781+fed64c13 |
python2-numpy AlmaLinux:8 | All versions | 1:1.14.2-16.module_el8.6.0+2781+fed64c13 |
python2-numpy AlmaLinux:8 | All versions | 1:1.14.2-16.module_el8.6.0+3162+01a09e5a |
python2-numpy-doc AlmaLinux:8 | All versions | 1:1.14.2-16.module_el8.6.0+2781+fed64c13 |
Products include Fedoraproject Fedora, Python Requests.
How do I fix CVE-2023-32681?
Upgrade requests to 2.31.0 or later.
Is CVE-2023-32681 being exploited?
There is no known exploitation of CVE-2023-32681 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as ALSA-2023:4350, ALSA-2023:4520, ALSA-2023:7042, AZL-26985, BELL-CVE-2023-32681, DEBIAN-CVE-2023-32681 and 27 more.