Proxy Credential Leakage in Requests Package: CVE-2023-32681

requests Updated 02 Oct 2025

Summary

26/05/2023
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2023-32681: Requests is a HTTP library. Affects requests versions < 2.31.0+dfsg-1. Fixed in 2.31.0+dfsg-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Requests package is a widely used HTTP library in Python, designed to simplify making HTTP requests. It provides a user-friendly interface for sending HTTP/1.1 requests, handling sessions, and managing cookies. However, a vulnerability has been identified that allows Proxy-Authorization headers to be unintentionally leaked to destination servers during HTTPS redirections.

Vulnerability Detail

Since version 2.3.0, the Requests library has been leaking Proxy-Authorization headers to destination servers when redirected to an HTTPS endpoint. This occurs due to the way the library handles proxy connections. When a request is sent through a proxy, the Proxy-Authorization header must be included in the CONNECT request. If the request is redirected to an HTTPS endpoint, the header is forwarded to the destination server, potentially exposing sensitive proxy credentials to malicious actors.

How To Fix

Minimum fixed version

2.31.0+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade requests

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, consider avoiding the use of proxy servers when making requests to HTTPS endpoints until the package is updated. Alternatively, you can manually remove the Proxy-Authorization header from requests if you have control over the request construction.

Conclusion

The vulnerability CVE-2023-32681 in the Requests package poses a significant risk by leaking sensitive proxy credentials to destination servers during HTTPS redirections. It is crucial to update to the patched version to mitigate this risk and ensure the security of your application.

See every vulnerability recorded for requests →

Share this vulnerability

FAQ

CVE-2023-32681 is a vulnerability in the Requests package that allows Proxy-Authorization headers to be leaked to destination servers during HTTPS redirections.

If your application uses the Requests library and makes HTTPS requests through a proxy, sensitive proxy credentials may be exposed to external servers.

The vulnerability affects all versions of Requests starting from 2.3.0 up to, but not including, 2.31.0+dfsg-1.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.

If you cannot update the Requests package right away, consider avoiding the use of proxy servers for HTTPS requests or manually removing the Proxy-Authorization header from your requests.

Related vulnerabilities

Recent vulnerabilities recorded for requests.

How To Fix

Minimum fixed version

2.31.0+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade requests

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback