Proxy credential disclosure on HTTPS redirects in Python Requests
CVE-2023-32681 is an information disclosure vulnerability in the Python Requests HTTP library affecting versions 2.3.0 through versions before 2.31.0. During redirection to an HTTPS endpoint, the rebuild_proxies function incorrectly reattaches the Proxy-Authorization header to the destination request. HTTPS proxy authentication belongs in the CONNECT request, rather than inside the encrypted tunnel, where the proxy cannot inspect or remove the header. Consequently, the redirected destination server can receive sensitive proxy credentials intended only for the proxy.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
A destination server receiving an affected redirected request can obtain proxy authentication credentials, compromising their confidentiality. Captured credentials could potentially be reused to authenticate to the proxy, subject to its authentication mechanism and access restrictions. The vulnerability has no identified direct integrity or availability impact.
If you can’t patch tonight, do this now.
Until the fix can be applied, prevent affected Requests clients from following redirects to HTTPS endpoints through authenticated proxies. Disabling automatic redirect following and rejecting such redirects avoids the vulnerable redirect-processing path.
Patch, then assume compromise.
Upgrade Requests to version 2.31.0 or later, or install a vendor-supported package containing the backported fix. Update affected applications, bundled dependencies, and container images that include vulnerable Requests versions. For distribution-managed installations, apply the corresponding vendor security updates; Google Container-Optimized OS identifies dev-python/requests and related package version 18244.1.61 or later as fixed.
No validated public exploits yet. Hidden: 1 rejected by Mallory's analysis as not a working exploit.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
17 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.