Description
Composer is a dependency manager for PHP. Users publishing a composer.phar to a public web-accessible server where the composer.phar can be executed as a php file may be subject to a remote code execution vulnerability if PHP also has `register_argc_argv` enabled in php.ini. Versions 2.6.4, 2.2.22 and 1.10.27 patch this vulnerability. Users are advised to upgrade. Users unable to upgrade should make sure `register_argc_argv` is disabled in php.ini, and avoid publishing composer.phar to the web as this is not best practice.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| composer | composer | 2.6.4, 2.2.21, 1.10.27, >= 2.0, < 2.2.22, < 1.10.27 | — |
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.6.4-1 | — |
| Debian 13 | composer | 2.6.4-1 | — |
| Debian 12 | composer | 2.5.5-1+deb12u4 | — |
| Debian 10 | composer | 1.8.4-1+deb10u3 | DLA-3777-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 SP5 | php-composer2 | 2.2.3-150400.3.6.1 | SUSE-SU-2023:4041-1 |
| SLES 15 SP4 | php-composer2 | 2.2.3-150400.3.6.1 | SUSE-SU-2023:4041-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | php-composer2 | 2.6.4-1.1 | openSUSE-SU-2024:13290-1 |
| openSUSE Leap 15.5 | php-composer2 | 2.2.3-150400.3.6.1 | SUSE-SU-2023:4041-1 |
| openSUSE Leap 15.4 | php-composer2 | 2.2.3-150400.3.6.1 | SUSE-SU-2023:4041-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | composer | 2.6.4-r0 | — |
| Alpine v3.23 | composer | 2.6.4-r0 | — |
| Alpine v3.22 | composer | 2.6.4-r0 | — |
| Alpine v3.21 | composer | 2.6.4-r0 | — |
| Alpine v3.20 | composer | 2.6.4-r0 | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | composer | 2.6.4-r0 | — |
| Alpine v3.18 | composer | 2.6.4-r0 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | composer | 2.5.8-2.amzn2023.0.1 | ALAS2023-2023-384 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | composer/composer | < 1.10.27 | 1.10.27 | GHSA-jm6m-4632-36hf |
| Packagist | composer/composer | >= 2.0.0, < 2.2.22 | 2.2.22 | GHSA-jm6m-4632-36hf |
| Packagist | composer/composer | >= 2.3.0, < 2.6.4 | 2.6.4 | GHSA-jm6m-4632-36hf |
Advisories 5
- USN-7603-1 composer vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DLA-3777-1 composer - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2023:4041-1 Security update for php-composer2 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:13290-1 php-composer2-2.6.4-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- ALAS2023-2023-384 Moderate: composer security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Oct 24, 2023
References
- https://github.com/composer/composer/security/advisories/GHSA-jm6m-4632-36hf
- https://github.com/composer/composer/commit/4fce14795aba98e40b6c4f5047305aba17a6120d
- https://github.com/composer/composer/commit/955a48e6319c8962e5cd421b07c00ab3c728968c
- https://github.com/composer/composer/commit/95e091c921037b7b6564942845e7b738f6b95c9c
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFOPGPW2KS37O3KJWBRGTUWHTXCQXBS2/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7AWYAUZNH565NWPIKGEIYBWHYNM5JGAE/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/66H2WKFUO255T3BZTL72TNYJYH2XM5FG/
- https://lists.debian.org/debian-lts-announce/2024/03/msg00030.html