# 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

- Priority: **Prioritise**
- Reason: Public exploit (reference, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2021-04-27 · Modified: 2024-08-03
- Aliases: openSUSE-SU-2021:1289-1, UBUNTU-CVE-2021-29472, USN-5220-1, DEBIAN-CVE-2021-29472, DLA-2654-1, DSA-4907-1, openSUSE-SU-2024:11166-1, ALPINE-CVE-2021-29472
- Record: https://cvemate.com/vulnerability/CVE-2021-29472 · JSON: https://cvemate.com/vulnerability/CVE-2021-29472/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 4.752%, percentile 92.122%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected

- alpine composer (Alpine Linux): ≥ 2.0, \< 2.0.13-r0
- composer composer: \< 1.10.22 \| ≥ 2.0, \< 2.0.13
- debian composer (Debian): \< 2.0.9-2 \| \< 1.2.2-1+deb9u1 \| \< 1.8.4-1+deb10u1
- ubuntu composer (Ubuntu): \< 1.0.0~beta2-1ubuntu0.1~esm1 \| \< 1.6.3-1ubuntu0.1~esm1 \| \< 1.10.1-1ubuntu0.1~esm1
- debian debian\_linux: 9.0 \| 10.0
- fedoraproject fedora: 33 \| 34
- getcomposer composer: \< 1.10.22 \| ≥ 2.0, \< 2.0.13
- opensuse php-composer&distro=openSUSE Leap 15.2 (openSUSE): \< 1.10.22-bp153.2.3.1
- opensuse php-composer&distro=openSUSE Leap 15.3 (openSUSE): \< 1.10.22-bp153.2.3.1
- opensuse php-composer&distro=openSUSE Tumbleweed (openSUSE): \< 1.10.22-2.2
- suse php-composer&distro=SUSE Package Hub 15 SP1 (SUSE Linux Enterprise): \< 1.10.22-bp153.2.3.1
- suse php-composer&distro=SUSE Package Hub 15 SP2 (SUSE Linux Enterprise): \< 1.10.22-bp153.2.3.1
- suse php-composer&distro=SUSE Package Hub 15 SP3 (SUSE Linux Enterprise): \< 1.10.22-bp153.2.3.1

## References

- <https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvx>
- <https://getcomposer.org/>
- <https://www.debian.org/security/2021/dsa-4907>
- <https://lists.debian.org/debian-lts-announce/2021/05/msg00009.html>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2/>
- <https://blog.sonarsource.com/php-supply-chain-attack-on-composer/>
- <https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/6ALRJGAG4EXTTIEI2CGMZH3NCUQIQUTQ/>
- <https://bugzilla.suse.com/1185376>
- <https://bugzilla.suse.com/1187416>
- <https://www.suse.com/security/cve/CVE-2021-29472>
- <https://ubuntu.com/security/CVE-2021-29472>
- <https://github.com/composer/composer/commit/083b73515d1d72bc61c6374440b3f8a37531f8cf>
- <https://ubuntu.com/security/notices/USN-5220-1>
- <https://www.cve.org/CVERecord?id=CVE-2021-29472>
- <https://security-tracker.debian.org/tracker/CVE-2021-29472>
- <https://security.alpinelinux.org/vuln/CVE-2021-29472>

---

Data as of 2026-12-05T04:22:49.921Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
