Command Injection in pip when used with Mercurial
When installing a package from a Mercurial VCS URL, e.g. `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 (e.g. `--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.
01
describes (1)
Related CVEs.
| ID | severity | exploitable | ||
|---|---|---|---|---|
| CVE-2023-5752US | low3.3 | — | ||
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 configur… | ||||
02
references
External citations — patches, advisories, analysis.
- https://github.com/pypa/advisory-database/tree/main/vulns/pip/PYSEC-2023-228.yamlWEB
- https://github.com/pypa/pipPACKAGE
- https://github.com/pypa/pip/commit/389cb799d0da9a840749fcd14878928467ed49b4WEB
- https://github.com/pypa/pip/pull/12306WEB
- https://lists.debian.org/debian-lts-announce/2025/10/msg00028.htmlWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/622OZXWG72ISQPLM5Y57YCVIMWHD4C3UWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/65UKKF5LBHEFDCUSPBHUN4IHYX7SRMHHWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FXUVMJM25PUAZRQZBF54OFVKTY3MINPWWEB
scry
Advisories like this name the exposed products attackers go after on your perimeter. See what is exposed on your perimeter with a free passive scan.
Free scan