Arbitrary Code Injection Affecting composer package, versions <2.0.9-2


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
5.98% (94th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-DEBIANUNSTABLE-COMPOSER-1277336
  • published28 Apr 2021
  • disclosed27 Apr 2021

Introduced: 27 Apr 2021

CVE-2021-29472  (opens in a new tab)
CWE-94  (opens in a new tab)
CWE-88  (opens in a new tab)

How to fix?

Upgrade Debian:unstable composer to version 2.0.9-2 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream composer package and not the composer package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

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 Scores

version 3.1