CVEfocus › CVE database › CVE-2021-29472

CVE-2021-29472Missing argument delimiter can lead to code execution via VCS repository URLs or source…

CVSS 8.8 HighEPSS 4.8% (higher than 93% of CVEs)Published 2021-04-27Updated 2024-08-03Assigner: GitHub_M

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.

CWE-88CWE-94

What to do

Fixed builds are available from Alpine, Debian, Packagist: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

16Fixed
3Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 20.04composerFix pending1.10.1-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-29472
Ubuntu 18.04composerFix pending1.6.3-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-29472
Ubuntu 16.04composerFix pending1.0.0~beta2-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-29472
Debian 14composerFixed2.0.9-2DEBIAN-CVE-2021-29472
Debian 13composerFixed2.0.9-2DEBIAN-CVE-2021-29472
Debian 12composerFixed2.0.9-2DEBIAN-CVE-2021-29472
Alpine Linux 3.24composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.23composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.22composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.21composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.20composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.19composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.18composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.17composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.16composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.15composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.14composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Alpine Linux 3.13composerFixed2.0.13-r0ALPINE-CVE-2021-29472
Packagist librarycomposer/composerFixed1.10.22GHSA-h5h8-pc6h-jvvx

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.