PT-2024-1571

CVE-2024-24821

·

Published

2024-02-08

·

Updated

2026-09-30

Description by

CVSS 3.1
8.8
High
MetricsAV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions Composer versions prior to 2.7.0 Composer versions prior to 2.2.23
Description The vulnerability is related to the inclusion of functions from an untrusted controlled area in the Composer dependency manager for PHP. Under certain conditions, arbitrary code execution may lead to local privilege escalation, provide lateral user movement, or malicious code execution when Composer is invoked within a directory with tampered files. All Composer CLI commands are affected, including composer.phar's self-update. High-risk scenarios include Composer being run with sudo, pipelines executing Composer on untrusted projects, and shared environments with developers running Composer individually on the same project.
Recommendations For versions prior to 2.7.0 and 2.2.23, update to version 2.7.0 or 2.2.23 to address the vulnerability. Where updating is not possible, remove all sudo composer privileges for all users to mitigate root privilege escalation. Avoid running Composer within an untrusted directory, or verify that the contents of vendor/composer/InstalledVersions.php and vendor/composer/installed.php do not include untrusted code. A reset can also be done on these files by running the following commands: rm vendor/composer/installed.php vendor/composer/InstalledVersions.php composer install --no-scripts --no-plugins
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-7C6P-848J-WH5H
ALT-PU-2024-2548
BIT-COMPOSER-2024-24821
CLEANSTART-2024-JY83809
DSA-5632-1
OPENSUSE-SU-2024_0592-1
OPENSUSE-SU-2024:13681-1
SUSE-SU-2024:0592-1
SUSE-SU-2024_0592-1
SUSE-SU-2026:1970-1
USN-7603-1
Found an issue in the description? Have something to add? Feel free to write us 👾