Skip to content

Composer Remote Code Execution vulnerability via web-accessible composer.phar

High severity GitHub Reviewed Published Sep 29, 2023 in composer/composer • Updated Mar 27, 2024

Package

composer composer/composer (Composer)

Affected versions

< 1.10.27
>= 2.0.0, < 2.2.22
>= 2.3.0, < 2.6.4

Patched versions

1.10.27
2.2.22
2.6.4

Description

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.

References

@Seldaek Seldaek published to composer/composer Sep 29, 2023
Published by the National Vulnerability Database Sep 29, 2023
Published to the GitHub Advisory Database Sep 29, 2023
Reviewed Sep 29, 2023
Last updated Mar 27, 2024

Severity

High
8.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2023-43655

GHSA ID

GHSA-jm6m-4632-36hf

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.