8.8

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

Modified
AliasesopenSUSE-SU-2021:1289-1UBUNTU-CVE-2021-29472USN-5220-1
Published 27-04-2021Last modified 03-08-2024

Vulnerability summary

CVE-2021-29472 is a high (CVSS 8.8) vulnerability in composer. EPSS estimates a 4.75% chance of exploitation in the next 30 days, higher than 92.1% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Prioritisepublic exploit

Public exploit (reference, Date unknown)

Source freshness unavailable

How is this decided?
CVSS score
8.8/10
010
High · v3.1 (CVE.org)
EPSS score
4.75%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1reference

Timeline

  1. 27-04-2021
    PublishedVulnerability first disclosed.
  2. 03-08-2024
    Last modifiedVulnerability information updated.

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.

CVSS metrics

6 scores · 5 sources · 2 versions

EPSS trend

Probability

4.75%

Chance of exploitation in the next 30 days

Percentile

92%

Versus all other CVEs

30-day change

No change 0.00 pp

From 4.75% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (blog.sonarsource.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Opensuse3 products
  • php-composer&distro=openSUSE Leap 15.2< 1.10.22-bp153.2.3.1
  • php-composer&distro=openSUSE Leap 15.3< 1.10.22-bp153.2.3.1
  • php-composer&distro=openSUSE Tumbleweed< 1.10.22-2.2
Suse3 products
  • php-composer&distro=SUSE Package Hub 15 SP1< 1.10.22-bp153.2.3.1
  • php-composer&distro=SUSE Package Hub 15 SP2< 1.10.22-bp153.2.3.1
  • php-composer&distro=SUSE Package Hub 15 SP3< 1.10.22-bp153.2.3.1
Debian2 products
  • composer< 2.0.9-2 | < 1.2.2-1+deb9u1 | < 1.8.4-1+deb10u1
  • debian_linuxEOL9.0 | 10.0
Alpine1 product
  • composer≥ 2.0, < 2.0.13-r0
Composer1 product
Fedoraproject1 product
Getcomposer1 product
Ubuntu1 product
  • composer< 1.0.0~beta2-1ubuntu0.1~esm1 | < 1.6.3-1ubuntu0.1~esm1 | < 1.10.1-1ubuntu0.1~esm1

8 vendors · 13 products

References

17 links
Show all 17 references