Critical Vulnerability in urllib3 and python-pip: Cookie Header Leakage Risk

python-pip Updated 02 Oct 2025

Summary

04/10/2023
N/A
No i
Medium
5.9

UBUNTU-CVE-2023-43804: urllib3 is a user-friendly HTTP client library for Python. Affects python-pip versions 1.4.1-2 – 1.5.4-1ubuntu4+esm5. No fix is published. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

urllib3 is a widely-used HTTP client library for Python, known for its user-friendly interface and robust features. It facilitates seamless communication over HTTP, handling connections, and managing requests efficiently. However, a recent vulnerability has been identified that allows users to inadvertently leak sensitive information through the Cookie HTTP header during HTTP redirects, posing a significant security risk.

Vulnerability Detail

The vulnerability arises from urllib3's handling of the Cookie HTTP header, which does not provide special treatment or management for cookies. Users can specify a Cookie header, and if they do not explicitly disable redirects, sensitive information may be leaked to different origins during HTTP redirects. This issue has been patched in urllib3 versions 1.26.17 and 2.0.5, and it has a CVSS score of 5.9, indicating a medium severity level.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can disable HTTP redirects when making requests using urllib3. This can be done by setting the redirect parameter to False in the request method, as shown below:

import urllib3 http = urllib3.PoolManager() response = http.request('GET', 'http://example.com', redirect=False)

Conclusion

The vulnerability in urllib3 and python-pip poses a significant risk of information leakage through the Cookie HTTP header during redirects. It is crucial for users to update their packages to the latest patched versions or implement workarounds to mitigate the risk. Regular monitoring of open-source vulnerabilities using tools like Vulert can help maintain application security.

See every vulnerability recorded for python-pip →

Share this vulnerability

FAQ

The vulnerability can lead to the unintentional leakage of sensitive information via HTTP redirects, potentially exposing user data to malicious actors.

You can use Vulert, which monitors open-source vulnerabilities in your software by analyzing a manifest file like package-lock.json. Visit Vulert Scanner to check your application without any signup.

Versions of urllib3 prior to 1.26.17 and 2.0.5 are affected by this vulnerability.

Yes, you can disable HTTP redirects in your requests to prevent the leakage of sensitive information.

If an immediate update is not possible, implement the workaround by disabling redirects in your HTTP requests until you can apply the patch.

Related vulnerabilities

Recent vulnerabilities recorded for python-pip.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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