Skip to content

Command Injection in pip when used with Mercurial

Moderate severity GitHub Reviewed Published Oct 25, 2023 to the GitHub Advisory Database • Updated May 3, 2024

Package

pip pip (pip)

Affected versions

< 23.3

Patched versions

23.3

Description

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.

References

Published by the National Vulnerability Database Oct 25, 2023
Published to the GitHub Advisory Database Oct 25, 2023
Reviewed Oct 30, 2023
Last updated May 3, 2024

Severity

Moderate
5.5
/ 10

CVSS base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

Weaknesses

CVE ID

CVE-2023-5752

GHSA ID

GHSA-mq26-g339-26xf

Source code

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.