Description
Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, the `status`, `reinstall` and `remove` commands with packages installed from source via git containing specially crafted branch names in the repository can be used to execute code. Patches for this issue are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid installing dependencies via git by using `--prefer-dist` or the `preferred-install: dist` config setting.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| composer | composer | >= 2.0, < 2.2.24, >= 2.3, < 2.7.7 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | composer | 2.7.7-1 | — |
| Debian 13 | composer | 2.7.7-1 | — |
| Debian 12 | composer | 2.5.5-1+deb12u2 | DSA-5715-1 |
| Debian 11 | composer | 2.0.9-2+deb11u3 | DSA-5715-1 |
| Debian 10 | composer | 1.8.4-1+deb10u4 | DLA-3838-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 24.04 LTS | composer | 2.7.1-2ubuntu0.1~esm1 | USN-7603-1 |
| Ubuntu Pro 22.04 LTS | composer | 2.2.6-2ubuntu4+esm1 | USN-7603-1 |
| Ubuntu Pro 20.04 LTS | composer | 1.10.1-1ubuntu0.1~esm2 | USN-7603-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | composer | 1.6.3-1ubuntu0.1~esm2 | USN-7603-1 |
| Ubuntu Pro 16.04 LTS | composer | 1.0.0~beta2-1ubuntu0.1~esm2 | USN-7603-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | php-composer2 | 2.6.4-150600.3.12.1 | SUSE-SU-2026:3105-1 |
| SLES 15 SP6 | php-composer2 | 2.6.4-150600.3.3.1 | SUSE-SU-2026:3105-1, SUSE-SU-2024:2107-1 |
| SLES 15 SP5 | php-composer2 | 2.2.3-150400.3.12.1 | SUSE-SU-2024:2106-1 |
| SLES 15 SP4 | php-composer2 | 2.2.3-150400.3.12.1 | SUSE-SU-2024:2106-1 |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP6 | php-composer2 | 2.6.4-150600.3.12.1 | SUSE-SU-2026:3105-1 |
| SLES for SAP 15 SP4 | php-composer2 | 2.2.3-150400.3.12.1 | SUSE-SU-2024:2106-1 |
| SLE HPC 15 SP4 | php-composer2 | 2.2.3-150400.3.12.1 | SUSE-SU-2024:2106-1 |
| SUSE Manager Server 4.3 | php-composer2 | 2.2.3-150400.3.12.1 | SUSE-SU-2024:2106-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | php-composer2 | 2.7.7-1.1 | openSUSE-SU-2024:14040-1 |
| openSUSE Leap 15.6 | php-composer2 | 2.6.4-150600.3.3.1 | SUSE-SU-2024:2107-1 |
| openSUSE Leap 15.5 | php-composer2 | 2.2.3-150400.3.12.1 | SUSE-SU-2024:2106-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | composer | 2.7.7-r0 | — |
| Alpine v3.23 | composer | 2.7.7-r0 | — |
| Alpine v3.22 | composer | 2.7.7-r0 | — |
| Alpine v3.21 | composer | 2.7.7-r0 | — |
| Alpine v3.20 | composer | 2.7.7-r0 | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | composer | 2.7.7-r0 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | composer | 2.5.8-2.amzn2023.0.3 | ALAS2023-2024-650 |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | composer | 2.7.7-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | composer/composer | >= 2.0, < 2.2.24 | 2.2.24 | GHSA-47f6-5gq3-vx9c |
| Packagist | composer/composer | >= 2.3, < 2.7.7 | 2.7.7 | GHSA-47f6-5gq3-vx9c |
Advisories 8
- SUSE-SU-2026:3105-1 Security update for php-composer2 SUSE / openSUSE Security Updates · Jul 18, 2026
- USN-7603-1 composer vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DSA-5715-1 composer - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3838-1 composer - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:14040-1 php-composer2-2.7.7-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2107-1 Security update for php-composer2 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2106-1 Security update for php-composer2 SUSE / openSUSE Security Updates · Feb 4, 2026
- ALAS2023-2024-650 Important: composer security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jul 10, 2024
References
- https://github.com/composer/composer/security/advisories/GHSA-47f6-5gq3-vx9c
- https://github.com/composer/composer/commit/b93fc6ca437da35ae73d667d0618749c763b67d4
- https://github.com/composer/composer/commit/ee28354ca8d33c15949ad7de2ce6656ba3f68704
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHC/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MC/