GitHub Advisory Database
GHSA-jm6m-4632-36hf
Composer Remote Code Execution vulnerability via web-accessible composer.phar
Details
Impact
Users publishing a composer.phar to a public web-accessible server where the composer.phar can be executed as a php file may be impacted if PHP also has register_argc_argv enabled in php.ini.
Patches
2.6.4, 2.2.22 and 1.10.27 patch this vulnerability.
Workarounds
Make sure register_argc_argv is disabled in php.ini, and avoid publishing composer.phar to the web as this really should not happen.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Packagist | composer/composer | All versions before 1.10.27 (fixed in 1.10.27) |
| Packagist | composer/composer | From 2.0.0 before 2.2.22 (fixed in 2.2.22) |
| Packagist | composer/composer | From 2.3.0 before 2.6.4 (fixed in 2.6.4) |
References
- https://github.com/composer/composer/security/advisories/GHSA-jm6m-4632-36hf
- https://nvd.nist.gov/vuln/detail/CVE-2023-43655
- 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
- https://lists.debian.org/debian-lts-announce/2024/03/msg00030.html
- https://lists.fedoraproject.org/archives/list/[email protected]/message/66H2WKFUO255T3BZTL72TNYJYH2XM5FG
- https://lists.fedoraproject.org/archives/list/[email protected]/message/7AWYAUZNH565NWPIKGEIYBWHYNM5JGAE
- https://lists.fedoraproject.org/archives/list/[email protected]/message/KFOPGPW2KS37O3KJWBRGTUWHTXCQXBS2