8.8

CVE-2021-29472: composer Argument Injection

CVSS: 8.8v3.1HighModified
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) Argument Injection vulnerability in composer. EPSS estimates a 4.75% chance of exploitation in the next 30 days, higher than 91.7% of scored vulnerabilities. 1 public exploit is recorded.

Overall risk
46/100
0100
Medium · default modelHow is this calculated?
CVSS score
8.8/10
010
High · v3.1 (CVE.org)
EPSS score
4.75%
0%100%
Low · +0.09 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known 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

5 scores · 4 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

+0.09 pp

From 4.66% on 19-09-2026

19-09-202619-10-2026
EPSS score
4.75%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (blog.sonarsource.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

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.8.4-1+deb10u1 | < 1.2.2-1+deb9u1
  • debian_linuxEOL9.0 | 10.0
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

7 vendors · 12 products

References

16 links
Show all 16 references