Skip to main content
← All vulnerabilities
CVE-2024-35242GHSA-V9QV-C7WM-WGMFBIT-COMPOSER-2024-35242

Composer vulnerable to command injection via malicious git/hg branch names

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.2.24, 2.7.7
1 proof of concept on GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: total

Summary

Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, the `composer install` command running inside a git/hg repository which has specially crafted branch names can lead to command injection. This requires cloning untrusted repositories. Patches are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid cloning potentially compromised repositories.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • composer composer

    From 2.0 · fixed in 2.2.24; From 2.3 · fixed in 2.7.7

  • composer/composerPackagist

    From 2.0 · fixed in 2.2.24

  • composer/composerPackagist

    From 2.3 · fixed in 2.7.7

References 6

GitHub · composer/composer

lists.fedoraproject.org

GitHub · KKkai0315/CVE-2024-35242