CVE-2023-5752: pip · Command Injection
Affects pipSource CVE Database V5
Not known to be exploited · CVSS 5.5 Medium : upgrade to 23.3 when convenient.
Data as of 26 Oct 2026, 06:26 UTC
- 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:NExploitation evidence
Disclosed: evidence found.
CVE published 24 Oct 2023
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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
| Product | Affected | Fixed in |
|---|---|---|
PyPIpippkg:pypi/pipOther threats | Affected
| Fixed in
|
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
- github.com/pypa/pip/pull/12306 (opens in a new tab)
- mail.python.org/archives/list/security-announce@python.org/thread/F4PL35U6X4VVHZ5ILJU3PWUWN7H7LZXL/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YBSB3SUPQ3VIFYUMHPO3MEQI4BJAXKCZ/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFC2SPFG5FLCZBYY2K3T5MFW2D22NG6E/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/622OZXWG72ISQPLM5Y57YCVIMWHD4C3U/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/65UKKF5LBHEFDCUSPBHUN4IHYX7SRMHH/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FXUVMJM25PUAZRQZBF54OFVKTY3MINPW/ (opens in a new tab)
- lists.debian.org/debian-lts-announce/2025/10/msg00028.html (opens in a new tab)