8.8
HIGH
CVE-2021-29472
Composer Mercurial Code Execution Vulnerability
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.

INFO

Published Date :

April 27, 2021, 9:15 p.m.

Last Modified :

Nov. 7, 2023, 3:32 a.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

2.8
Public PoC/Exploit Available at Github

CVE-2021-29472 has a 2 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

Affected Products

The following products are affected by CVE-2021-29472 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Fedoraproject fedora
1 Debian debian_linux
1 Getcomposer composer

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

None

Updated: 2 months, 2 weeks ago
66 stars 14 fork 14 watcher
Born at : Oct. 13, 2021, 4:56 a.m. This repo has been linked 175 different CVEs too.

https://twitch.tv/mdisec

Updated: 2 months, 4 weeks ago
1046 stars 124 fork 124 watcher
Born at : April 8, 2020, 6:44 p.m. This repo has been linked 10 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-29472 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-29472 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE/ [No types assigned]
    Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2/ [No types assigned]
    Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2/
    Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE/
  • Modified Analysis by [email protected]

    Dec. 13, 2022

    Action Type Old Value New Value
    Changed Reference Type https://blog.sonarsource.com/php-supply-chain-attack-on-composer/ No Types Assigned https://blog.sonarsource.com/php-supply-chain-attack-on-composer/ Exploit, Third Party Advisory
  • CVE Modified by [email protected]

    Aug. 02, 2022

    Action Type Old Value New Value
    Added Reference https://blog.sonarsource.com/php-supply-chain-attack-on-composer/ [No Types Assigned]
  • Modified Analysis by [email protected]

    Jun. 04, 2022

    Action Type Old Value New Value
    Changed Reference Type https://lists.debian.org/debian-lts-announce/2021/05/msg00009.html No Types Assigned https://lists.debian.org/debian-lts-announce/2021/05/msg00009.html Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE/ Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2/ Mailing List, Third Party Advisory
    Changed CPE Configuration OR *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* OR *cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
    Added CPE Configuration OR *cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    May. 26, 2021

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/KN3DMFH42BJW45VT6FYF2RXKC26D6VC2/ [No Types Assigned]
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/FAQUAMGO4Q4BLNZ2OH4CXQD7UK4IO2GE/ [No Types Assigned]
  • CVE Modified by [email protected]

    May. 12, 2021

    Action Type Old Value New Value
    Added Reference https://lists.debian.org/debian-lts-announce/2021/05/msg00009.html [No Types Assigned]
  • Initial Analysis by [email protected]

    May. 07, 2021

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:S/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://getcomposer.org/ No Types Assigned https://getcomposer.org/ Vendor Advisory
    Changed Reference Type https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvx No Types Assigned https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvx Third Party Advisory
    Changed Reference Type https://www.debian.org/security/2021/dsa-4907 No Types Assigned https://www.debian.org/security/2021/dsa-4907 Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:* versions up to (excluding) 1.10.22 *cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:* versions from (including) 2.0 up to (excluding) 2.0.13
    Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Apr. 30, 2021

    Action Type Old Value New Value
    Added Reference https://www.debian.org/security/2021/dsa-4907 [No Types Assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

11.75 }} 3.10%

score

0.95310

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability