# CVE-2021-29472: Missing argument delimiter can lead to code execution via VCS repository URLs or source download URLs on systems with Mercurial in composer

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.75%, higher than 92% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-04-27T20:30:15.000Z
- Modified: 2026-09-08T08:45:58.450Z
- Also known as: GHSA-h5h8-pc6h-jvvx, BIT-COMPOSER-2021-29472
- Weaknesses: CWE-88, CWE-94
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- composer composer: < 1.10.22; >=2.0,<2.0.13
- composer/composer (Packagist): before 1.10.22; from 2.0.0-alpha1 before 2.0.13
- getcomposer composer: before 1.10.22; from 2.0 before 2.0.13
- debian debian_linux: 9.0; 10.0
- fedoraproject fedora: 33; 34
- composer (Bitnami): before 1.10.22; from 2.0.0 before 2.0.13

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.5 Medium `AV:N/AC:L/Au:S/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating High

## References

- <https://blog.sonarsource.com/php-supply-chain-attack-on-composer/> (exploit, advisory, third-party-advisory)
- <https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvx> (advisory, third-party-advisory, web)
- <https://getcomposer.org/> (advisory, vendor-advisory)
- <https://www.debian.org/security/2021/dsa-4907> (advisory, third-party-advisory, vendor-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2021/05/msg00009.html> (advisory, mailing-list, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE/> (vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2/> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-29472> (advisory, web)
- <https://blog.sonarsource.com/php-supply-chain-attack-on-composer> (web)
- <https://getcomposer.org> (web)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/composer/composer/CVE-2021-29472.yaml> (web)
- <https://github.com/composer/composer> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2> (web)

## Sources

- CVE List: [CVE-2021-29472](https://www.cve.org/CVERecord?id=CVE-2021-29472), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-h5h8-pc6h-jvvx](https://github.com/advisories/GHSA-h5h8-pc6h-jvvx), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-29472](https://nvd.nist.gov/vuln/detail/CVE-2021-29472), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-COMPOSER-2021-29472](https://osv.dev/vulnerability/BIT-COMPOSER-2021-29472), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-29472 · Whole record: https://cve.day/CVE-2021-29472.json · Rebuilt by cve.day 2026-11-25T22:58:01.064Z
