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

- Severity: Medium 5.5 (CVSS:3.1, scored by PSF) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.50%, higher than 44% of CVEs (2026-12-02)
- Published: 2023-10-24T20:56:05.469Z
- Modified: 2026-09-10T03:50:03.949Z
- Also known as: GHSA-mq26-g339-26xf, PYSEC-2023-228
- Weaknesses: CWE-77
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: PSF

## 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.

(As written by CVE List.)

## Affected

- pip: no versions given (not affected: 23.3)
- pip (PyPI): before 23.3
- pypa pip: before 23.3

## Every score

- PSF: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:4.0 Medium `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: CVSS:3.1 3.3 Low `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 3.3 Low `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N`

## References

- <https://github.com/pypa/pip/pull/12306> (fix, patch, web)
- <https://mail.python.org/archives/list/security-announce@python.org/thread/F4PL35U6X4VVHZ5ILJU3PWUWN7H7LZXL/> (advisory, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YBSB3SUPQ3VIFYUMHPO3MEQI4BJAXKCZ/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFC2SPFG5FLCZBYY2K3T5MFW2D22NG6E/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/622OZXWG72ISQPLM5Y57YCVIMWHD4C3U/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/65UKKF5LBHEFDCUSPBHUN4IHYX7SRMHH/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FXUVMJM25PUAZRQZBF54OFVKTY3MINPW/>
- <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://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> (web)
- <https://github.com/advisories/GHSA-mq26-g339-26xf> (advisory)

## Sources

- CVE List: [CVE-2023-5752](https://www.cve.org/CVERecord?id=CVE-2023-5752), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-mq26-g339-26xf](https://github.com/advisories/GHSA-mq26-g339-26xf), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-5752](https://nvd.nist.gov/vuln/detail/CVE-2023-5752), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-228](https://osv.dev/vulnerability/PYSEC-2023-228), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2023-5752 · Whole record: https://cve.day/CVE-2023-5752.json · Rebuilt by cve.day 2026-11-25T22:58:29.629Z
