CVE-2021-29472

Missing argument delimiter can lead to code execution via VCS repository URLs or source download URLs on systems with Mercurial in composer

HIGH
8.8
CVSS Score
Published: April 27, 2021 at 08:30 PM UTC
Updated: June 17, 2026 at 03:47 AM UTC
4 products affected across 4 vendorsDebian LinuxFedoraComposer

Using composer by composer?

Get instant alerts when new vulnerabilities affect composer - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 5%

Description

Composer is a dependency manager for PHP. URLs for Mercurial repositories in the root composer.json and package source download URLs are not sanitized correctly. Specifically crafted URL values allow code to be executed in the HgDriver if hg/Mercurial is installed on the system. The impact to Composer users directly is limited as the composer.json file is typically under their own control and source download URLs can only be supplied by third party Composer repositories they explicitly trust to download and execute source code from, e.g. Composer plugins. The main impact is to services passing user input to Composer, including Packagist.org and Private Packagist. This allowed users to trigger remote code execution. The vulnerability has been patched on Packagist.org and Private Packagist within 12h of receiving the initial vulnerability report and based on a review of logs, to the best of our knowledge, was not abused by anyone. Other services/tools using VcsRepository/VcsDriver or derivatives may also be vulnerable and should upgrade their composer/composer dependency immediately. Versions 1.10.22 and 2.0.13 include patches for this issue.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.10.222.0 ≤ v < 2.0.13
Affected range stops below 1.10.22, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.0.13, so it looks safe — our inference, not a vendor statement
v < 1.10.22v < 2.0.13
Affected range stops below 1.10.22, so it looks safe — our inference, not a vendor statement
Affected range stops below 2.0.13, so it looks safe — our inference, not a vendor statement

CVSS

8.8HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-88CWE-94

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card