CVEfocus › CVE database › CVE-2023-5752

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

CVSS 5.5 MediumEPSS 0.5% (higher than 34% of CVEs)Published 2023-10-24Updated 2025-11-03Assigner: PSF

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.

CWE-77

What to do

Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.

Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

3Fixed
3Fix pending
2Will not fix
15Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 16.04python-pipFix pending
Debian 14python-pipFixed23.3+dfsg-1DEBIAN-CVE-2023-5752
Debian 13python-pipFixed23.3+dfsg-1DEBIAN-CVE-2023-5752
Debian 12python-pipFix pendingDEBIAN-CVE-2023-5752
Red Hat Enterprise Linux 10python3.14-pipNot affected
Red Hat Enterprise Linux 10python3.14-pip-wheelNot affected
Red Hat Enterprise Linux 9python-pipNot affected
Red Hat Enterprise Linux 9python3-pipNot affected
Red Hat Enterprise Linux 9python3-pip-wheelNot affected
Red Hat Enterprise Linux 9python3-pyrsistentFix pending
Fix deferred
Red Hat Enterprise Linux 9python3.12-pipNot affected
Red Hat Enterprise Linux 9python3.12-pip-wheelNot affected
Red Hat Enterprise Linux 9python3.14-pipNot affected
Red Hat Enterprise Linux 9python3.14-pip-wheelNot affected
Red Hat Enterprise Linux 8platform-python-pipNot affected
Red Hat Enterprise Linux 8python-pipNot affected
Red Hat Enterprise Linux 8python3-pipNot affected
Red Hat Enterprise Linux 8python3-pip-wheelNot affected
Red Hat Enterprise Linux 8python3.12-pipNot affected
Red Hat Enterprise Linux 8python3.12-pip-wheelNot affected
Red Hat Enterprise Linux 7python-pipWill not fix
Out of support scope
Red Hat Enterprise Linux 7python3-pipWill not fix
Out of support scope
PyPI librarypipFixed23.3GHSA-mq26-g339-26xf

What the vendor says

As published in the CVE record by PSF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.