Skip to main content
CVE-2023-5752VulnerabilityPublished Updated

CVE-2023-5752: pip · Command Injection

Affects pipSource CVE Database V5

0

Not known to be exploited · CVSS 5.5 Medium : upgrade to 23.3 when convenient.

Data as of 26 Oct 2026, 06:26 UTC

CVSS 3.1 base score
5.5Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.4% chance of exploitation in 30 days – higher than 42% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 23.3
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 24 Oct 2023

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.

What to do

Upgrade pip to 23.3.

Affected software

ProductAffectedFixed in
PyPIpippkg:pypi/pipOther threatsAffected
  • <23.3
Fixed in
  • 23.3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

1. Upgrade pip to version 23.3 or later immediately, as this version contains the fix for CVE-2023-5752. 2. Avoid installing Python packages from Mercurial VCS URLs unless absolutely necessary; prefer more secure and widely used sources like PyPI or Git repositories. 3. Audit and sanitize all inputs related to package installation commands, especially those involving Mercurial revisions, to prevent injection of malicious configuration options. 4. Implement strict controls and monitoring on build and deployment pipelines to detect unusual or unauthorized package sources or configurations. 5. Use virtual environments and containerization to isolate package installations and limit the impact of potential compromises. 6. Educate developers and DevOps teams about the risks of using Mercurial URLs in pip installations and encourage best practices for secure package management. 7. Employ software composition analysis tools to detect and alert on vulnerable pip versions or unsafe package sources. 8. Review and restrict permissions for users who can execute pip install commands with Mercurial URLs to reduce the attack surface.

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.

References

Community reviews

Loading reviews…