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.

Severity (CVSS 3.1)6.4Medium
Exploit odds (30 days)1.5%top 25.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Alpine:v3.20composer2.6.4-r0ALPINE-CVE-2023-43655
Alpine:v3.21composer2.6.4-r0ALPINE-CVE-2023-43655
Alpine:v3.22composer2.6.4-r0ALPINE-CVE-2023-43655
Alpine:v3.23composer2.6.4-r0ALPINE-CVE-2023-43655
Alpine:v3.24composer2.6.4-r0ALPINE-CVE-2023-43655
Debian:12composer2.5.5-1+deb12u4DEBIAN-CVE-2023-43655
Debian:13composer2.6.4-1DEBIAN-CVE-2023-43655
Debian:14composer2.6.4-1DEBIAN-CVE-2023-43655
Packagistcomposer/composer2.6.4GHSA-jm6m-4632-36hf
Packagistcomposer/composer2.2.22GHSA-jm6m-4632-36hf
Packagistcomposer/composer1.10.27GHSA-jm6m-4632-36hf

Affected products (as reported)

VendorProductVersions
composer composer 2.6.4, 2.2.21, 1.10.27>= 2.0, < 2.2.22< 1.10.27

Weakness: CWE-74 · Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H

References