6.4medium
Remote Code Execution via web-accessible composer.phar
- Severity
- 6.4medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.90% (higher than 80% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-jm6m-4632-36hfBIT-COMPOSER-2023-43655
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
| Product or package | Versions | Reported by |
|---|---|---|
| composer composer | 2.6.4, 2.2.21, 1.10.27, >= 2.0, < 2.2.22, < 1.10.27 | CVE List |
| docker composer | up to 2.6.4 | CVE List |
| composer/composer (Packagist) | before 1.10.27, from 2.0.0 before 2.2.22, from 2.3.0 before 2.6.4 | GitHub Advisory Database |
| getcomposer composer | before 1.10.27, from 2.0.0 before 2.2.21, from 2.3.0 before 2.6.4 | NVD |
| debian debian_linux | 10.0 | NVD |
| fedoraproject fedora | 37, 38 | NVD |
| composer (Bitnami) | before 1.10.27, from 2.0.0 before 2.2.21, from 2.3.0 before 2.6.4 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 6.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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.
NVD (es)
Composer es un administrador de dependencias para PHP. Los usuarios que publican un composer.phar en un servidor público accesible desde la web donde se puede ejecutar el composer.phar como un archivo php pueden estar sujetos a una vulnerabilidad de ejecución remota de código si PHP también tiene `register_argc_argv` habilitado en php.ini. Las versiones 2.6.4, 2.2.22 y 1.10.27 corrigen esta vulnerabilidad. Se recomienda a los usuarios que actualicen. Los usuarios que no puedan actualizar deben asegurarse de que `register_argc_argv` esté deshabilitado en php.ini y evitar publicar composer.phar en la web, ya que esta no es la mejor práctica.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-43655 changed 2025-06-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jm6m-4632-36hf changed 2025-02-13 | CC-BY-4.0 |
| NVD | CVE-2023-43655 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-COMPOSER-2023-43655 changed 2026-09-08 | Apache-2.0 |