CVE-2024-35242 Composer vulnerable to command injection via malicious git/hg branch names
HighCVSS 8.8
EPSS 3.3%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
- Technology
- PHPUbuntuDebian
Description
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.
Upgrade path
20 packages: 18 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| alpine/composer(Alpine v3.19) | < 2.7.7-r0 | 2.7.7-r0 | Fixed |
| alpine/composer(Alpine v3.20) | < 2.7.7-r0 | 2.7.7-r0 | Fixed |
| alpine/composer(Alpine v3.21) | < 2.7.7-r0 | 2.7.7-r0 | Fixed |
| alpine/composer(Alpine v3.22) | < 2.7.7-r0 | 2.7.7-r0 | Fixed |
| alpine/composer(Alpine v3.23) | < 2.7.7-r0 | 2.7.7-r0 | Fixed |
| alpine/composer(Alpine v3.24) | < 2.7.7-r0 | 2.7.7-r0 | Fixed |
| composer/composer(Packagist) | = 2.0.0; = 2.0.0-alpha1; = 2.0.0-alpha2; = 2.0.0-alpha3 +100 more | 2.2.24, 2.7.7 | Fixed |
| debian/composer(Debian 12) | < 2.5.5-1+deb12u2; = 2.5.5-1; = 2.5.5-1+deb12u1 | 2.5.5-1+deb12u2 | Fixed |
| debian/composer(Debian 13) | < 2.7.7-1 | 2.7.7-1 | Fixed |
| debian/composer(Debian 14) | < 2.7.7-1 | 2.7.7-1 | Fixed |
| getcomposer composer | >= 2.0, < 2.2.24; >= 2.3, < 2.7.7 | 2.2.24, 2.7.7 | Fixed |
| ubuntu/composer(Ubuntu 22.04) | < 2.2.6-2ubuntu4+esm1 | 2.2.6-2ubuntu4+esm1 | Fixed |
| ubuntu/composer(Ubuntu 24.04) | < 2.7.1-2ubuntu0.1~esm1 | 2.7.1-2ubuntu0.1~esm1 | Fixed |
| ubuntu/composer(Ubuntu Pro 16.04) | < 1.0.0~beta2-1ubuntu0.1~esm2; = 1.0.0~alpha10+20150602-1; = 1.0.0~alpha10+20150602-2; = 1.0.0~alpha11-1 +6 more | 1.0.0~beta2-1ubuntu0.1~esm2 | Fixed |
| ubuntu/composer(Ubuntu Pro 18.04) | < 1.6.3-1ubuntu0.1~esm2; = 1.5.1-1; = 1.5.2-1; = 1.6.2-1 +2 more | 1.6.3-1ubuntu0.1~esm2 | Fixed |
| ubuntu/composer(Ubuntu Pro 20.04) | < 1.10.1-1ubuntu0.1~esm2; = 1.9.0-2; = 1.9.1-1; = 1.9.2-1 +4 more | 1.10.1-1ubuntu0.1~esm2 | Fixed |
| ubuntu/composer(Ubuntu Pro 22.04) | < 2.2.6-2ubuntu4+esm1; = 2.0.9-2ubuntu2; = 2.0.9-2ubuntu3; = 2.0.13-1ubuntu1 +2 more | 2.2.6-2ubuntu4+esm1 | Fixed |
| ubuntu/composer(Ubuntu Pro 24.04) | < 2.7.1-2ubuntu0.1~esm1; = 2.5.8-1; = 2.6.5-1; = 2.6.6-1 +1 more | 2.7.1-2ubuntu0.1~esm1 | Fixed |
| composer/composer | = >= 2.0, < 2.2.24; = >= 2.3, < 2.7.7 | No fix listed | Versions listed |
| fedoraproject fedora | = 39; = 40 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| composer/composer(Packagist) | >= 2.0, < 2.2.24 | 2.2.24 |
| composer/composer(Packagist) | = 2.0.0 | No fix listed |
| composer/composer(Packagist) | = 2.0.0-RC1 | No fix listed |
| composer/composer(Packagist) | = 2.0.0-RC2 | No fix listed |
| composer/composer(Packagist) | = 2.0.0-alpha1 | No fix listed |
| composer/composer(Packagist) | = 2.0.0-alpha2 | No fix listed |
| composer/composer(Packagist) | = 2.0.0-alpha3 | No fix listed |
| composer/composer(Packagist) | = 2.0.1 | No fix listed |
| composer/composer(Packagist) | = 2.0.10 | No fix listed |
| composer/composer(Packagist) | = 2.0.11 | No fix listed |
| composer/composer(Packagist) | = 2.0.12 | No fix listed |
| composer/composer(Packagist) | = 2.0.13 | No fix listed |
| composer/composer(Packagist) | = 2.0.14 | No fix listed |
| composer/composer(Packagist) | = 2.0.2 | No fix listed |
| composer/composer(Packagist) | = 2.0.3 | No fix listed |
| composer/composer(Packagist) | = 2.0.4 | No fix listed |
| composer/composer(Packagist) | = 2.0.5 | No fix listed |
| composer/composer(Packagist) | = 2.0.6 | No fix listed |
| composer/composer(Packagist) | = 2.0.7 | No fix listed |
| composer/composer(Packagist) | = 2.0.8 | No fix listed |
| composer/composer(Packagist) | = 2.0.9 | No fix listed |
| composer/composer(Packagist) | = 2.1.0 | No fix listed |
| composer/composer(Packagist) | = 2.1.0-RC1 | No fix listed |
| composer/composer(Packagist) | = 2.1.1 | No fix listed |
| composer/composer(Packagist) | = 2.1.10 | No fix listed |
Show 133 more
| Product | Affected versions | Fixed in |
|---|---|---|
| composer/composer(Packagist) | = 2.1.11 | No fix listed |
| composer/composer(Packagist) | = 2.1.12 | No fix listed |
| composer/composer(Packagist) | = 2.1.14 | No fix listed |
| composer/composer(Packagist) | = 2.1.2 | No fix listed |
| composer/composer(Packagist) | = 2.1.3 | No fix listed |
| composer/composer(Packagist) | = 2.1.4 | No fix listed |
| composer/composer(Packagist) | = 2.1.5 | No fix listed |
| composer/composer(Packagist) | = 2.1.6 | No fix listed |
| composer/composer(Packagist) | = 2.1.7 | No fix listed |
| composer/composer(Packagist) | = 2.1.8 | No fix listed |
| composer/composer(Packagist) | = 2.1.9 | No fix listed |
| composer/composer(Packagist) | = 2.2.0 | No fix listed |
| composer/composer(Packagist) | = 2.2.0-RC1 | No fix listed |
| composer/composer(Packagist) | = 2.2.1 | No fix listed |
| composer/composer(Packagist) | = 2.2.10 | No fix listed |
| composer/composer(Packagist) | = 2.2.11 | No fix listed |
| composer/composer(Packagist) | = 2.2.12 | No fix listed |
| composer/composer(Packagist) | = 2.2.13 | No fix listed |
| composer/composer(Packagist) | = 2.2.14 | No fix listed |
| composer/composer(Packagist) | = 2.2.15 | No fix listed |
| composer/composer(Packagist) | = 2.2.16 | No fix listed |
| composer/composer(Packagist) | = 2.2.17 | No fix listed |
| composer/composer(Packagist) | = 2.2.18 | No fix listed |
| composer/composer(Packagist) | = 2.2.19 | No fix listed |
| composer/composer(Packagist) | = 2.2.2 | No fix listed |
| composer/composer(Packagist) | = 2.2.20 | No fix listed |
| composer/composer(Packagist) | = 2.2.21 | No fix listed |
| composer/composer(Packagist) | = 2.2.22 | No fix listed |
| composer/composer(Packagist) | = 2.2.23 | No fix listed |
| composer/composer(Packagist) | = 2.2.3 | No fix listed |
| composer/composer(Packagist) | = 2.2.4 | No fix listed |
| composer/composer(Packagist) | = 2.2.5 | No fix listed |
| composer/composer(Packagist) | = 2.2.6 | No fix listed |
| composer/composer(Packagist) | = 2.2.7 | No fix listed |
| composer/composer(Packagist) | = 2.2.8 | No fix listed |
| composer/composer(Packagist) | = 2.2.9 | No fix listed |
| composer/composer(Packagist) | >= 2.3, < 2.7.7 | 2.7.7 |
| composer/composer(Packagist) | = 2.3.0 | No fix listed |
| composer/composer(Packagist) | = 2.3.0-RC1 | No fix listed |
| composer/composer(Packagist) | = 2.3.0-RC2 | No fix listed |
| composer/composer(Packagist) | = 2.3.1 | No fix listed |
| composer/composer(Packagist) | = 2.3.10 | No fix listed |
| composer/composer(Packagist) | = 2.3.2 | No fix listed |
| composer/composer(Packagist) | = 2.3.3 | No fix listed |
| composer/composer(Packagist) | = 2.3.4 | No fix listed |
| composer/composer(Packagist) | = 2.3.5 | No fix listed |
| composer/composer(Packagist) | = 2.3.6 | No fix listed |
| composer/composer(Packagist) | = 2.3.7 | No fix listed |
| composer/composer(Packagist) | = 2.3.8 | No fix listed |
| composer/composer(Packagist) | = 2.3.9 | No fix listed |
| composer/composer(Packagist) | = 2.4.0 | No fix listed |
| composer/composer(Packagist) | = 2.4.0-RC1 | No fix listed |
| composer/composer(Packagist) | = 2.4.1 | No fix listed |
| composer/composer(Packagist) | = 2.4.2 | No fix listed |
| composer/composer(Packagist) | = 2.4.3 | No fix listed |
| composer/composer(Packagist) | = 2.4.4 | No fix listed |
| composer/composer(Packagist) | = 2.5.0 | No fix listed |
| composer/composer(Packagist) | = 2.5.1 | No fix listed |
| composer/composer(Packagist) | = 2.5.2 | No fix listed |
| composer/composer(Packagist) | = 2.5.3 | No fix listed |
| composer/composer(Packagist) | = 2.5.4 | No fix listed |
| composer/composer(Packagist) | = 2.5.5 | No fix listed |
| composer/composer(Packagist) | = 2.5.6 | No fix listed |
| composer/composer(Packagist) | = 2.5.7 | No fix listed |
| composer/composer(Packagist) | = 2.5.8 | No fix listed |
| composer/composer(Packagist) | = 2.6.0 | No fix listed |
| composer/composer(Packagist) | = 2.6.1 | No fix listed |
| composer/composer(Packagist) | = 2.6.2 | No fix listed |
| composer/composer(Packagist) | = 2.6.3 | No fix listed |
| composer/composer(Packagist) | = 2.6.4 | No fix listed |
| composer/composer(Packagist) | = 2.6.5 | No fix listed |
| composer/composer(Packagist) | = 2.6.6 | No fix listed |
| composer/composer(Packagist) | = 2.7.0 | No fix listed |
| composer/composer(Packagist) | = 2.7.1 | No fix listed |
| composer/composer(Packagist) | = 2.7.2 | No fix listed |
| composer/composer(Packagist) | = 2.7.3 | No fix listed |
| composer/composer(Packagist) | = 2.7.4 | No fix listed |
| composer/composer(Packagist) | = 2.7.5 | No fix listed |
| composer/composer(Packagist) | = 2.7.6 | No fix listed |
| debian/composer(Debian:12) | < 2.5.5-1+deb12u2 | 2.5.5-1+deb12u2 |
| debian/composer(Debian:12) | = 2.5.5-1 | No fix listed |
| debian/composer(Debian:12) | = 2.5.5-1+deb12u1 | No fix listed |
| debian/composer(Debian:13) | < 2.7.7-1 | 2.7.7-1 |
| debian/composer(Debian:14) | < 2.7.7-1 | 2.7.7-1 |
| ubuntu/composer(Ubuntu:22.04) | < 2.2.6-2ubuntu4+esm1 | 2.2.6-2ubuntu4+esm1 |
| composer/composer | = >= 2.0, < 2.2.24 | No fix listed |
| composer/composer | = >= 2.3, < 2.7.7 | No fix listed |
| fedoraproject fedora | = 39 | No fix listed |
| fedoraproject fedora | = 40 | No fix listed |
| getcomposer composer | >= 2.0, < 2.2.24 | 2.2.24 |
| getcomposer composer | >= 2.3, < 2.7.7 | 2.7.7 |
| alpine/composer(Alpine:v3.19) | < 2.7.7-r0 | 2.7.7-r0 |
| alpine/composer(Alpine:v3.20) | < 2.7.7-r0 | 2.7.7-r0 |
| alpine/composer(Alpine:v3.21) | < 2.7.7-r0 | 2.7.7-r0 |
| alpine/composer(Alpine:v3.22) | < 2.7.7-r0 | 2.7.7-r0 |
| alpine/composer(Alpine:v3.23) | < 2.7.7-r0 | 2.7.7-r0 |
| alpine/composer(Alpine:v3.24) | < 2.7.7-r0 | 2.7.7-r0 |
| ubuntu/composer(Ubuntu:24.04) | < 2.7.1-2ubuntu0.1~esm1 | 2.7.1-2ubuntu0.1~esm1 |
| ubuntu/composer(Ubuntu:Pro:16.04) | < 1.0.0~beta2-1ubuntu0.1~esm2 | 1.0.0~beta2-1ubuntu0.1~esm2 |
| ubuntu/composer(Ubuntu:Pro:16.04) | = 1.0.0~alpha10+20150602-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:16.04) | = 1.0.0~alpha10+20150602-2 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:16.04) | = 1.0.0~alpha11-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:16.04) | = 1.0.0~alpha11-1ubuntu1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:16.04) | = 1.0.0~alpha11-2 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:16.04) | = 1.0.0~alpha11-3 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:16.04) | = 1.0.0~beta1-1ubuntu1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:16.04) | = 1.0.0~beta2-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:16.04) | = 1.0.0~beta2-1ubuntu0.1~esm1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:18.04) | < 1.6.3-1ubuntu0.1~esm2 | 1.6.3-1ubuntu0.1~esm2 |
| ubuntu/composer(Ubuntu:Pro:18.04) | = 1.5.1-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:18.04) | = 1.5.2-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:18.04) | = 1.6.2-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:18.04) | = 1.6.3-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:18.04) | = 1.6.3-1ubuntu0.1~esm1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:20.04) | < 1.10.1-1ubuntu0.1~esm2 | 1.10.1-1ubuntu0.1~esm2 |
| ubuntu/composer(Ubuntu:Pro:20.04) | = 1.9.0-2 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:20.04) | = 1.9.1-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:20.04) | = 1.9.2-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:20.04) | = 1.9.3-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:20.04) | = 1.10.0-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:20.04) | = 1.10.1-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:20.04) | = 1.10.1-1ubuntu0.1~esm1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:22.04) | < 2.2.6-2ubuntu4+esm1 | 2.2.6-2ubuntu4+esm1 |
| ubuntu/composer(Ubuntu:Pro:22.04) | = 2.0.9-2ubuntu2 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:22.04) | = 2.0.9-2ubuntu3 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:22.04) | = 2.0.13-1ubuntu1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:22.04) | = 2.1.12-1ubuntu1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:22.04) | = 2.2.6-2ubuntu4 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:24.04) | < 2.7.1-2ubuntu0.1~esm1 | 2.7.1-2ubuntu0.1~esm1 |
| ubuntu/composer(Ubuntu:Pro:24.04) | = 2.5.8-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:24.04) | = 2.6.5-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:24.04) | = 2.6.6-1 | No fix listed |
| ubuntu/composer(Ubuntu:Pro:24.04) | = 2.7.1-2 | No fix listed |
References
- https://github.com/composer/composer/security/advisories/GHSA-v9qv-c7wm-wgmf issue-tracking vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/composer/composer/commit/6bd43dff859c597c09bd03a7e7d6443822d0a396 issue-tracking patch
- https://github.com/composer/composer/commit/fc57b93603d7d90b71ca8ec77b1c8a9171fdb467 issue-tracking patch
- github.com product
- lists.fedoraproject.org issue-tracking
- lists.fedoraproject.org issue-tracking
- github.com
- Debian Security Tracker CVE-2024-35242 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- USN-7603-1 vendor-advisory
- www.cve.org issue-tracking
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking