CVE-2021-29472Missing argument delimiter can lead to code execution via VCS repository URLs or source download URLs on systems with Mercurial in composer
- 8.8HighCVSS base score
- 4.8%Exploitation in 30 daysEPSS · top 8.0% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 28 days later
· 28 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 4.8% · top 8.0% of all CVEs (16 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistcomposer/composerGHSA-h5h8-pc6h-jvvx (opens in a new tab)
References
References7
- https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvx (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://getcomposer.org/ (opens in a new tab)x_refsource_MISCx_transferred
- DSA-4907 (opens in a new tab)vendor-advisoryx_refsource_DEBIANx_transferred
- [debian-lts-announce] 20210511 [SECURITY] [DLA 2654-1] composer security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- FEDORA-2021-8a098ecbcf (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- FEDORA-2021-ab7d0d3486 (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- https://blog.sonarsource.com/php-supply-chain-attack-on-composer/ (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-0829 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-h5h8-pc6h-jvvx (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-29472)Record last updated .