Vulnerability · Published Oct 24, 2023 · Assigned by PSF

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

Medium 5.5

In plain English

A medium-severity command injection in pip from Pip maintainers. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 43% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.5Medium
Exploit odds (30 days)0.5%top 56.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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 "--config"). Controlling the Mercurial configuration can modify how and which repository is installed. This vulnerability does not affect users who aren't installing from Mercurial.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12python-pipno fix listedDEBIAN-CVE-2023-5752
Debian:13python-pip23.3+dfsg-1DEBIAN-CVE-2023-5752
Debian:14python-pip23.3+dfsg-1DEBIAN-CVE-2023-5752
PyPIpip23.3PYSEC-2023-228
PyPIpip23.3GHSA-mq26-g339-26xf
Ubuntu:22.04:LTSpython-pipno fix listedUBUNTU-CVE-2023-5752
Ubuntu:24.04:LTSpython-pipno fix listedUBUNTU-CVE-2023-5752

Affected products (as reported)

VendorProductVersions
Pip maintainers pip see references

Weakness: CWE-77 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

References