{"id":"CVE-2023-5752","aliases":["CVE-2023-5752","GHSA-mq26-g339-26xf","PYSEC-2023-228"],"related":[],"kind":"vulnerability","state":"published","title":"Mercurial configuration injectable in repo revision when installing via pip","summary":"When installing a package from a Mercurial VCS URL  (ie \"pip install \nhg+...\") with pip prior to v23.3, the specified Mercurial revision could\n be used to inject arbitrary configuration options to the \"hg clone\" \ncall (ie \"--config\"). Controlling the Mercurial configuration can modify\n how and which repository is installed. This vulnerability does not \naffect users who aren't installing from Mercurial.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"When installing a package from a Mercurial VCS URL  (ie \"pip install \nhg+...\") with pip prior to v23.3, the specified Mercurial revision could\n be used to inject arbitrary configuration options to the \"hg clone\" \ncall (ie \"--config\"). Controlling the Mercurial configuration can modify\n how and which repository is installed. This vulnerability does not \naffect users who aren't installing from Mercurial.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Al instalar un paquete desde una URL de Mercurial VCS (es decir, \"pip install hg+...\") con pip anterior a v23.3, la revisión de Mercurial especificada podría usarse para inyectar opciones de configuración arbitrarias a la llamada \"hg clone\" (es decir, \" --config”). Controlar la configuración de Mercurial puede modificar cómo y qué repositorio se instala. Esta vulnerabilidad no afecta a los usuarios que no instalan desde Mercurial.","source":"nvd"}],"published":"2023-10-24T20:56:05.469Z","modified":"2026-09-10T03:50:03.949Z","severity":{"scorer":"PSF","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"PSF","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":3.3,"rating":"LOW"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","score":3.3,"rating":"LOW"}],"cwes":["CWE-77"],"affected":[{"ranges":[{"version":"23.3","status":"unaffected"}],"vendor":"Pip maintainers","product":"pip","package":"pip","repo":"https://github.com/pypa/pip","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"23.3"}],"ecosystem":"PyPI","package":"pip","purl":"pkg:pypi/pip","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"23.3"}],"vendor":"pypa","product":"pip","cpe":"cpe:2.3:a:pypa:pip:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"23.3"}],"ecosystem":"PyPI","package":"pip","purl":"pkg:pypi/pip","source":"pysec"}],"references":[{"url":"https://github.com/pypa/pip/pull/12306","tags":["fix","patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/F4PL35U6X4VVHZ5ILJU3PWUWN7H7LZXL/","tags":["advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YBSB3SUPQ3VIFYUMHPO3MEQI4BJAXKCZ/","tags":["x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFC2SPFG5FLCZBYY2K3T5MFW2D22NG6E/","tags":["x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/622OZXWG72ISQPLM5Y57YCVIMWHD4C3U/","tags":["x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/65UKKF5LBHEFDCUSPBHUN4IHYX7SRMHH/","tags":["x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FXUVMJM25PUAZRQZBF54OFVKTY3MINPW/","tags":["x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00028.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-5752","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/pip/commit/389cb799d0da9a840749fcd14878928467ed49b4","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pip/PYSEC-2023-228.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/pip","tags":["package"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/622OZXWG72ISQPLM5Y57YCVIMWHD4C3U","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/65UKKF5LBHEFDCUSPBHUN4IHYX7SRMHH","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FXUVMJM25PUAZRQZBF54OFVKTY3MINPW","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFC2SPFG5FLCZBYY2K3T5MFW2D22NG6E","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YBSB3SUPQ3VIFYUMHPO3MEQI4BJAXKCZ","tags":["web"],"sources":["ghsa"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/F4PL35U6X4VVHZ5ILJU3PWUWN7H7LZXL","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-mq26-g339-26xf","tags":["advisory"],"sources":["pysec"]}],"credits":["Paul Gerste"],"assigner":"PSF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-08-08T13:38:11.134Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-5752","url":"https://www.cve.org/CVERecord?id=CVE-2023-5752","licence":"CVE Terms of Use","modified":"2025-11-03T17:31:06.982Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mq26-g339-26xf","url":"https://github.com/advisories/GHSA-mq26-g339-26xf","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:03.949Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-5752","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-5752","licence":"Public domain","modified":"2026-06-17T06:49:17.790Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2023-228","url":"https://osv.dev/vulnerability/PYSEC-2023-228","licence":"CC-BY-4.0","modified":"2026-06-10T17:01:27.606Z"}],"updatedAt":"2026-11-25T22:58:29.629Z","epss":{"score":0.00502,"percentile":0.44559,"date":"2026-12-02T12:00:21.000Z"}}