CVE-2021-29472
Last modified
CVE-2021-29472 is a high-severity vulnerability rated 8.8/10 on the CVSS scale. 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. EPSS estimates a 4.81% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Getcomposer | Composer | < 1.10.22 |
| Getcomposer | Composer | >= 2.0, < 2.0.13 |
| Debian | Debian Linux | 9.0 |
| Debian | Debian Linux | 10.0 |
| Fedoraproject | Fedora | 33 |
| Fedoraproject | Fedora | 34 |
References
- https://blog.sonarsource.com/php-supply-chain-attack-on-composer/Exploit, Third Party Advisory
- https://getcomposer.org/Vendor Advisory
- https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvxThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/05/msg00009.htmlMailing List, Third Party Advisory
- https://www.debian.org/security/2021/dsa-4907Third Party Advisory
- https://blog.sonarsource.com/php-supply-chain-attack-on-composer/Exploit, Third Party Advisory
- https://getcomposer.org/Vendor Advisory
- https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvxThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/05/msg00009.htmlMailing List, Third Party Advisory
- https://www.debian.org/security/2021/dsa-4907Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2021-29472?
How severe is CVE-2021-29472?
How do I fix CVE-2021-29472?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2021
- CVE-2021-29466Discord-Recon is a bot for the Discord chat service. In vers…7.5
- CVE-2021-29467Wrongthink is an encrypted peer-to-peer chat program. A user…6.1
- CVE-2021-29468Cygwin Git is a patch set for the git command line tool for …8.8
- CVE-2021-29469Node-redis is a Node.js Redis client. Before version 3.1.1, …7.5
- CVE-2021-29470Exiv2 is a command-line utility and C++ library for reading,…6.5
- CVE-2021-29471Synapse is a Matrix reference homeserver written in python (…5.3
- CVE-2021-29473Exiv2 is a C++ library and a command-line utility to read, w…2.5
- CVE-2021-29474HedgeDoc (formerly known as CodiMD) is an open-source collab…5.8
- CVE-2021-29475HedgeDoc (formerly known as CodiMD) is an open-source collab…10
- CVE-2021-29476Requests is a HTTP library written in PHP. Requests mishandl…9.8
- CVE-2021-29477Redis is an open source (BSD licensed), in-memory data struc…8.8
- CVE-2021-29478Redis is an open source (BSD licensed), in-memory data struc…8.8
Are you affected by CVE-2021-29472?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
