What’s Vulnerable › Vulnerabilities
CVE-2023-43655: Remote Code Execution via web-accessible composer.phar
- Severity: high (CVSS 8.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-09-29 · updated 2026-06-17
- Weakness: CWE-74
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
- Debian Linux: 10.0
- Fedoraproject Fedora: 37, 38
- composer: before 1.10.27; from 2.0.0 before 2.2.21; from 2.3.0 before 2.6.4 — fixed in 1.10.27, 2.2.21, 2.6.4
- Packagist Composer/Composer: before 1.10.27; from 2.0.0 before 2.2.22; from 2.3.0 before 2.6.4; 1.0.0, 1.0.0-alpha1, 1.0.0-alpha10, 1.0.0-alpha11, 1.0.0-alpha2, 1.0.0-alpha3 (+172) — fixed in 1.10.27, 2.2.22, 2.6.4
How to fix
Upgrade to a fixed version: composer 1.10.27, 2.2.21, 2.6.4; Packagist Composer/Composer 1.10.27, 2.2.22, 2.6.4. Check the vendor advisory for mitigations.
References
- https://github.com/composer/composer/commit/4fce14795aba98e40b6c4f5047305aba17a6120d
- https://github.com/composer/composer/commit/955a48e6319c8962e5cd421b07c00ab3c728968c
- https://github.com/composer/composer/commit/95e091c921037b7b6564942845e7b738f6b95c9c
- https://github.com/composer/composer/security/advisories/GHSA-jm6m-4632-36hf
- https://lists.debian.org/debian-lts-announce/2024/03/msg00030.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/66H2WKFUO255T3BZTL72TNYJYH2XM5FG/
- 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/KFOPGPW2KS37O3KJWBRGTUWHTXCQXBS2/
- https://github.com/composer/composer/commit/4fce14795aba98e40b6c4f5047305aba17a6120d
- https://github.com/composer/composer/commit/955a48e6319c8962e5cd421b07c00ab3c728968c
- https://github.com/composer/composer/commit/95e091c921037b7b6564942845e7b738f6b95c9c
- https://github.com/composer/composer/security/advisories/GHSA-jm6m-4632-36hf
Get alerted when CVE-2023-43655 or the next vulnerability affects your stack