CVE-2023-5752

Mercurial configuration injectable in repo revision when installing via pip

Published Oct 24, 2023 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4348-1 python-pip security update
EUVD EUVD EUVD-2023-0200 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.
Github GHSA Github GHSA GHSA-mq26-g339-26xf Command Injection in pip when used with Mercurial
History
Type Values Removed Values Added
Metrics epss

{'score': 0.0004}

epss

{'score': 0.00045}

Type Values Removed Values Added
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. 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.
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Nov 3, 2025, 5:31 PM
Reserved
Oct 24, 2023, 3:04 PM
Status
Modified
Published
Oct 25, 2023, 6:17 PM
Modified
Jun 17, 2026, 6:49 AM
Severity
Low
Public date
Oct 25, 2023, 12:00 AM