CVE-2021-29472
Summary
| CVE | CVE-2021-29472 |
|---|---|
| State | PUBLIC |
| Assigner | [email protected] |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2021-04-27 21:15:00 UTC |
| Updated | 2023-11-07 03:32:00 UTC |
| 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. |
Risk And Classification
Problem Types: CWE-94 | CWE-88
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| 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
| Reference | Source | Link | Tags |
|---|---|---|---|
| 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 |
No vendor comments have been submitted for this CVE.
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)