CVE-2021-29472

Summary

CVECVE-2021-29472
StatePUBLIC
Assigner[email protected]
Source PriorityCVE Program / NVD first with legacy fallback
Published2021-04-27 21:15:00 UTC
Updated2023-11-07 03:32:00 UTC
DescriptionComposer 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.

Risk And Classification

Problem Types: CWE-94 | CWE-88

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Debian Debian Linux 10.0 All All All
Operating System Debian Debian Linux 9.0 All All All
Operating System Fedoraproject Fedora 33 All All All
Operating System Fedoraproject Fedora 34 All All All
Application Getcomposer Composer All All All All

References

ReferenceSourceLinkTags
Missing argument delimiter can lead to command execution via VCS repository URLs or source download URLs on systems with Mercurial · Advisory · composer/composer · GitHub CONFIRM github.com
[SECURITY] Fedora 34 Update: composer-2.0.13-1.fc34 - package-announce - Fedora Mailing-Lists lists.fedoraproject.org
[SECURITY] Fedora 33 Update: composer-2.0.13-1.fc33 - package-announce - Fedora Mailing-Lists lists.fedoraproject.org
PHP Supply Chain Attack on Composer MISC blog.sonarsource.com
Debian -- Security Information -- DSA-4907-1 composer DEBIAN www.debian.org
[SECURITY] [DLA 2654-1] composer security update MLIST lists.debian.org
Composer MISC getcomposer.org
[SECURITY] Fedora 33 Update: composer-2.0.13-1.fc33 - package-announce - Fedora Mailing-Lists FEDORA lists.fedoraproject.org
[SECURITY] Fedora 34 Update: composer-2.0.13-1.fc34 - package-announce - Fedora Mailing-Lists FEDORA lists.fedoraproject.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 178571 Debian Security Update for composer (DSA 4907-1)
  • 178587 Debian Security Update for composer (DLA 2654-1)
  • 179571 Debian Security Update for composer (CVE-2021-29472)
  • 281134 Fedora Security Update for composer (FEDORA-2021-ab7d0d3486)
  • 281135 Fedora Security Update for composer (FEDORA-2021-8a098ecbcf)
  • 501534 Alpine Linux Security Update for composer
  • 504627 Alpine Linux Security Update for composer
  • 751162 OpenSUSE Security Update for php-composer (openSUSE-SU-2021:1289-1)
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

CVE.report and Source URL Uptime Status status.cve.report