Vulnerability · Published Sep 29, 2023 · Assigned by GitHub_M
CVE-2023-43655Remote Code Execution via web-accessible composer.phar
Medium 6.4
In plain English
A medium-severity injection in composer from composer. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 75% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | composer | 2.6.4-r0 | ALPINE-CVE-2023-43655 |
| Alpine:v3.21 | composer | 2.6.4-r0 | ALPINE-CVE-2023-43655 |
| Alpine:v3.22 | composer | 2.6.4-r0 | ALPINE-CVE-2023-43655 |
| Alpine:v3.23 | composer | 2.6.4-r0 | ALPINE-CVE-2023-43655 |
| Alpine:v3.24 | composer | 2.6.4-r0 | ALPINE-CVE-2023-43655 |
| Debian:12 | composer | 2.5.5-1+deb12u4 | DEBIAN-CVE-2023-43655 |
| Debian:13 | composer | 2.6.4-1 | DEBIAN-CVE-2023-43655 |
| Debian:14 | composer | 2.6.4-1 | DEBIAN-CVE-2023-43655 |
| Packagist | composer/composer | 2.6.4 | GHSA-jm6m-4632-36hf |
| Packagist | composer/composer | 2.2.22 | GHSA-jm6m-4632-36hf |
| Packagist | composer/composer | 1.10.27 | GHSA-jm6m-4632-36hf |
Affected products (as reported)
Weakness: CWE-74 · Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/composer/composer/security/advisories/GHSA-jm6m-4632-36hf x_refsource_CONFIRM
- https://github.com/composer/composer/commit/4fce14795aba98e40b6c4f5047305aba17a6120d x_refsource_MISC
- https://github.com/composer/composer/commit/955a48e6319c8962e5cd421b07c00ab3c728968c x_refsource_MISC
- https://github.com/composer/composer/commit/95e091c921037b7b6564942845e7b738f6b95c9c x_refsource_MISC
- 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