CVE-2023-5752: pip - Mercurial configuration injectable in repo revision when installing via pip

python-pip Updated 02 Oct 2025

Summary

25/10/2023
N/A
No i
Low
3.3

CVE-2023-5752: When installing a package from a Mercurial VCS URL (ie "pip install hg+...") with pip prior to v23.3, the specified Mercurial revision could be used to inject arbitrary configuration options to the "hg clone" call (ie "-... Affects python-pip versions < e3dc91dad93a020b3034a87ebe59027f63370fe8. 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

pip is a package management system used to install and manage software packages written in Python. It is the standard package manager for Python and is widely used in the Python community. pip allows users to easily install packages from various sources, including PyPI (Python Package Index), version control systems like Git and Mercurial, and local directories. It provides a command-line interface for installing, upgrading, and removing packages, as well as managing package dependencies.

Vulnerability Detail

The vulnerability (CVE-2023-5752) in pip allows for the injection of arbitrary configuration options to the 'hg clone' call when installing a package from a Mercurial VCS URL. This can be exploited by specifying a malicious Mercurial revision, which can modify the way and which repository is installed. The vulnerability affects pip versions prior to v23.3 and only impacts users who are installing packages from Mercurial. The vulnerability has a CVSS score of 3.3, 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

There is no known workaround for this vulnerability. It is recommended to update pip to the fixed version.

Conclusion

The vulnerability in pip allows for the injection of arbitrary configuration options when installing packages from Mercurial VCS URLs. To mitigate this vulnerability, it is important to update pip to version 23.3 or later. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for python-pip →

Share this vulnerability

FAQ

pip is a package management system used to install and manage software packages written in Python.

Mercurial is a distributed version control system used for managing software projects.

Users who are installing packages from Mercurial VCS URLs using pip versions prior to v23.3 are affected by this vulnerability.

The vulnerability allows for the injection of arbitrary configuration options, which can modify the way and which repository is installed when installing packages from Mercurial VCS URLs.

To fix this vulnerability, update your pip installation to version 23.3 or later by running the command 'pip install --upgrade pip'.

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