CVE catalog

CVE-2021-29472

composer: CVE-2021-29472

[CVE catalog]

Severity
High · CVSS 8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
4.75% · Oct 27, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiancomposersid2.10.3-1fixed
Debiancomposerforky2.10.3-1fixed
Debiancomposertrixie2.8.8-1+deb13u3fixed
Debiancomposerbookworm2.5.5-1+deb12u5fixed
Debiancomposerbookworm-security2.5.5-1+deb12u2fixed
Ubuntucomposerpro1.9.0-2vulnerable
Ubuntucomposerpro1.9.1-1vulnerable
Ubuntucomposerpro1.9.2-1vulnerable
Ubuntucomposerpro1.9.3-1vulnerable
Ubuntucomposerpro1.10.0-1vulnerable
Ubuntucomposerpro1.10.1-1vulnerable
Ubuntucomposerpro1.10.1-1ubuntu0.1~esm1fixed
Ubuntucomposerpro1.9.0-2vulnerable
Ubuntucomposerpro1.9.1-1vulnerable
Ubuntucomposerpro1.9.2-1vulnerable
Ubuntucomposerpro1.9.3-1vulnerable
Ubuntucomposerpro1.10.0-1vulnerable
Ubuntucomposerpro1.10.1-1vulnerable
Ubuntucomposerpro1.10.1-1ubuntu0.1~esm1fixed
Opensusephp-composertumbleweed1.10.22-2.2fixed
Susephp-composerpackage hub 15 sp11.10.22-bp153.2.3.1fixed
Susephp-composerpackage hub 15 sp21.10.22-bp153.2.3.1fixed
Susephp-composerpackage hub 15 sp31.10.22-bp153.2.3.1fixed
Opensusephp-composerleap 15.21.10.22-bp153.2.3.1fixed
Opensusephp-composerleap 15.31.10.22-bp153.2.3.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiancomposersourcesid2.0.9-2not yet assignedNot reportedNot reported
Debiancomposersourceforky2.0.9-2not yet assignedNot reportedNot reported
Debiancomposersourcetrixie2.0.9-2not yet assignedNot reportedNot reported
Debiancomposersourcebookworm2.0.9-2not yet assignedNot reportedNot reported
Ubuntucomposerdebpro1.10.1-1ubuntu0.1~esm1Not reportedUSN-5220-1Not reported
Ubuntucomposerdebpro1.10.1-1ubuntu0.1~esm1Not reportedUBUNTU-CVE-2021-29472Not reported
Opensusephp-composerrpmtumbleweed1.10.22-2.2Not reportedOPENSUSE-SU-2024:11166-1Not reported
Susephp-composerrpmpackage hub 15 sp11.10.22-bp153.2.3.1Not reportedOPENSUSE-SU-2021:1289-1Not reported
Susephp-composerrpmpackage hub 15 sp21.10.22-bp153.2.3.1Not reportedOPENSUSE-SU-2021:1289-1Not reported
Susephp-composerrpmpackage hub 15 sp31.10.22-bp153.2.3.1Not reportedOPENSUSE-SU-2021:1289-1Not reported
Opensusephp-composerrpmleap 15.21.10.22-bp153.2.3.1Not reportedOPENSUSE-SU-2021:1289-1Not reported
Opensusephp-composerrpmleap 15.31.10.22-bp153.2.3.1Not reportedOPENSUSE-SU-2021:1289-1Not reported

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [composer]Fixed
    Details (4)
    • 2.5.5-1+deb12u5 · all · bookworm

      Fixed · Fixed: 2.0.9-2

      dsa · composer · debian · bookworm; dsa · composer · debian · 12

    • 2.5.5-1+deb12u5 · all · bookworm

      Fixed · Fixed: 2.0.9-2

      dsa · composer · debian · bookworm; dsa · composer · debian · 12

    • 2.5.5-1+deb12u2 · all · bookworm-security

      Fixed · Fixed: 2.0.9-2

      dsa · composer · debian · bookworm; dsa · composer · debian · 12

    • 2.5.5-1+deb12u2 · all · bookworm-security

      Fixed · Fixed: 2.0.9-2

      dsa · composer · debian · bookworm; dsa · composer · debian · 12

[Debian 13 (Trixie)]

  • [composer]Fixed
    Details (2)
    • 2.8.8-1+deb13u3 · all · trixie

      Fixed · Fixed: 2.0.9-2

      dsa · composer · debian · 13

    • 2.8.8-1+deb13u3 · all · trixie

      Fixed · Fixed: 2.0.9-2

      dsa · composer · debian · 13

[openSUSE Tumbleweed]

  • Source package: [php-composer]

    Details (1)
    • 1.10.26-2.8 · noarch · tumbleweed

      Fixed · Fixed: 1.10.22-2.2

      dsa · php-composer · opensuse · tumbleweed

Observed:

References