CVE-2023-5752
LOW 3.3CVSS 3.1Command Injection in pip when used with Mercurial
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.
- Published
- 25 Oct 2023
- Last modified
- 10 Sep 2026
- Assigned by
- cna@python.org
- NVD status
- Modified
- Weakness
- CWE-77
- Also known as
- GHSA-mq26-g339-26xfPYSEC-2023-228
- Sources
- NVDJSONOSV GHSA-mq26-g339-26xfJSONOSV PYSEC-2023-228JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N | |
| NVD | cna@python.org (Secondary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | LOW 3.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N |
| OSV | PyPA | CVSS 3.1 | LOW 3.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | pypa | pipcpe:2.3:a:pypa:pip:*:*:*:*:*:*:*:* |
< 23.3 | 23.3 |
| OSV | PyPI | pip | < 23.3 | 23.3 |
References
- https://github.com/pypa/pip/pull/12306 · Patch, WEB, FIX
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/622OZXWG72ISQPLM5Y57YCVIMWHD4C3U/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/65UKKF5LBHEFDCUSPBHUN4IHYX7SRMHH/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FXUVMJM25PUAZRQZBF54OFVKTY3MINPW/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFC2SPFG5FLCZBYY2K3T5MFW2D22NG6E/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YBSB3SUPQ3VIFYUMHPO3MEQI4BJAXKCZ/ · WEB
- https://mail.python.org/archives/list/security-announce@python.org/thread/F4PL35U6X4VVHZ5ILJU3PWUWN7H7LZXL/ · Vendor Advisory, WEB, ADVISORY
- https://lists.debian.org/debian-lts-announce/2025/10/msg00028.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-5752 · ADVISORY
- https://github.com/pypa/pip/commit/389cb799d0da9a840749fcd14878928467ed49b4 · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/pip/PYSEC-2023-228.yaml · WEB
- https://github.com/pypa/pip · PACKAGE
- https://github.com/advisories/GHSA-mq26-g339-26xf · ADVISORY
History
- 25 Nov 2026 20:37 UTC · NVD: first stored (published 25 Oct 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 25 Oct 2023)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 25 Oct 2023)