Security mailing lists by PureSourceCode

CVE-2021-29472

HIGH 8.8CVSS 3.1

Composer's missing argument delimiter can lead to code execution via VCS repository URLs or source download URLs on systems with Mercurial

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.

Published
27 Apr 2021
Last modified
8 Jul 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-88CWE-94
Also known as
BIT-composer-2021-29472GHSA-h5h8-pc6h-jvvx
Sources
NVDJSONOSV GHSA-h5h8-pc6h-jvvxJSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
OSV GitHub CVSS 3.1 HIGH 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD nvd@nist.gov (Primary) CVSS 2.0 MEDIUM 6.5 AV:N/AC:L/Au:S/C:P/I:P/A:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD getcomposer composer
cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*
< 1.10.22 1.10.22
NVD getcomposer composer
cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*
>= 2.0, < 2.0.13 2.0.13
NVD debian debian_linux
cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
= 9.0
NVD debian debian_linux
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
= 10.0
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
= 33
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
= 34
OSV Packagist composer/composer < 1.10.22 1.10.22
OSV Packagist composer/composer >= 2.0.0-alpha1, < 2.0.13 2.0.13

References

History

  • 25 Nov 2026 20:33 UTC · NVD: first stored (published 27 Apr 2021)
  • 25 Nov 2026 20:15 UTC · OSV: first stored (published 29 Apr 2021)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.