CVE-2021-29472
CVSS v3
8.8
HIGH
EPSS Score
4.8 %
exploit probability, as of 2026-10-19
CISA KEV
No
known exploited
Exploitation
—
SSVC status
Get an alert for each new CVE published for composer.
Affected and fixed versions
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- composerBitnamiall versions · fixed in 1.10.22
- composer/composerPackagistfrom 2.0.0-alpha1 · fixed in 2.0.13
Vendor advisories
- CVE-2021-29472 Red Hat Product Security
composer: Specifically crafted URL values allow code to be executed in the HgDriver
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.
Technical details
- Published
- 2021-04-27
Frequently asked questions
What is CVE-2021-29472?
Is CVE-2021-29472 actively exploited?
What is the CVSS score for CVE-2021-29472?
Running composer? Hear about its next vulnerability
CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.
Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? CVE Watch alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.