CVE-2023-43655
JSON

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 packageVersionsReported by
composer composer2.6.4, 2.2.21, 1.10.27, >= 2.0, < 2.2.22, < 1.10.27CVE List
docker composerup to 2.6.4CVE List
composer/composer (Packagist)before 1.10.27, from 2.0.0 before 2.2.22, from 2.3.0 before 2.6.4GitHub Advisory Database
getcomposer composerbefore 1.10.27, from 2.0.0 before 2.2.21, from 2.3.0 before 2.6.4NVD
debian debian_linux10.0NVD
fedoraproject fedora37, 38NVD
composer (Bitnami)before 1.10.27, from 2.0.0 before 2.2.21, from 2.3.0 before 2.6.4Bitnami Vulnerability Database

All scores

GitHub_M6.4medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H
GitHub8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasehigh rating

Classification

CWE-74

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

https://github.com/composer/composer/security/advisories/GHSA-jm6m-4632-36hfadvisory, vendor-advisory, web
https://github.com/composer/composer/commit/4fce14795aba98e40b6c4f5047305aba17a6120dfix, patch, web
https://github.com/composer/composer/commit/955a48e6319c8962e5cd421b07c00ab3c728968cfix, patch, web
https://github.com/composer/composer/commit/95e091c921037b7b6564942845e7b738f6b95c9cfix, patch, web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KFOPGPW2KS37O3KJWBRGTUWHTXCQXBS2/advisory, mailing-list, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7AWYAUZNH565NWPIKGEIYBWHYNM5JGAE/advisory, mailing-list, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/66H2WKFUO255T3BZTL72TNYJYH2XM5FG/advisory, mailing-list, third-party-advisory
https://lists.debian.org/debian-lts-announce/2024/03/msg00030.htmldiscussion, mailing-list, web
https://nvd.nist.gov/vuln/detail/CVE-2023-43655advisory, web
https://github.com/composer/composerpackage
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/66H2WKFUO255T3BZTL72TNYJYH2XM5FGweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7AWYAUZNH565NWPIKGEIYBWHYNM5JGAEweb

Sources

SourceRecordLicence
CVE ListCVE-2023-43655 changed 2025-06-18CVE Terms of Use
GitHub Advisory DatabaseGHSA-jm6m-4632-36hf changed 2025-02-13CC-BY-4.0
NVDCVE-2023-43655 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-COMPOSER-2023-43655 changed 2026-09-08Apache-2.0