Skip to content
Heist/ feed
Back to feed
Medium

Mercurial configuration injectable in repo revision when installing via pip

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-5752
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 05:12 UTC · Revision 1

Source evidence

Mercurial configuration injectable in repo revision when installing via pip

core-osv · Original source

Published 24 Oct 2023, 20:56 UTC

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.

osv:CVE-2023-5752
Complete source record
{
  "id": "11a1b8998ef8bd635417e1a518641c28fc78799dac935ba1c2d64aab63a388a8",
  "url": "https://osv.dev/vulnerability/CVE-2023-5752",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Mercurial configuration injectable in repo revision when installing via pip",
    "summary": "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.",
    "evidence": "osv:CVE-2023-5752",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2023-5752",
      "aliases": [
        "CVE-2023-5752",
        "GHSA-mq26-g339-26xf",
        "PYSEC-2023-228"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/pypa/pip",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "e3dc91dad93a020b3034a87ebe59027f63370fe8"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "23.3"
                      }
                    ],
                    "source": "DESCRIPTION"
                  },
                  {
                    "cpe": "cpe:2.3:a:pypa:pip:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "23.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "21.3",
            "21.0",
            "20.0.2",
            "19.1.1",
            "19.0.2",
            "19.0",
            "18.1",
            "18.0",
            "10.0.1",
            "10.0.0",
            "9.0.1",
            "9.0.0",
            "6.0",
            "1.4rc2",
            "1.4rc1",
            "1.2",
            "1.0",
            "0.8.3",
            "0.8.2",
            "0.8",
            "0.7.1",
            "0.7",
            "0.6",
            "0.3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-5752.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.837186555Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2025/10/msg00028.html",
        "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.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFC2SPFG5FLCZBYY2K3T5MFW2D22NG6E/",
        "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YBSB3SUPQ3VIFYUMHPO3MEQI4BJAXKCZ/",
        "https://pypi.org",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/5xxx/CVE-2023-5752.json",
        "https://mail.python.org/archives/list/security-announce@python.org/thread/F4PL35U6X4VVHZ5ILJU3PWUWN7H7LZXL/",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-5752",
        "https://github.com/pypa/pip/pull/12306",
        "https://github.com/pypa/pip"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-77"
        ],
        "cna_assigner": "PSF",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/5xxx/CVE-2023-5752.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-5752",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 518340,
  "published_at": "2023-10-24T20:56:05.469+00:00"
}