Advisory

GHSA-mq26-g339-26xf

Also known as: CVE-2023-5752, PYSEC-2023-228

Summary

Command Injection in pip when used with Mercurial

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2023-10-25 18:32 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

pip

PyPI · All systems

Affected

  • introduced 0, fixed 23.3 (ecosystem)

Fixed versions

23.3

Fix

  • Fixed version 23.3
    pip install --upgrade pip==23.3

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences