Read the docs
TI-2024-16338 Aliases CVE-2024-24821GHSA-7c6p-848j-wh5h

Code execution and possible privilege escalation via compromised InstalledVersions.php or installed.php in Composer

Priority MEDIUM 40CWE-829Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-829.

Summary

Composer is a dependency Manager for the PHP language. In affected versions several files within the local working directory are included during the invocation of Composer and in the context of the executing user. As such, 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. The following scenarios are of high risk: Composer being run with sudo, Pipelines which may execute Composer on untrusted projects, Shared environments with developers who run Composer individually on the same project. This vulnerability has been addressed in versions 2.7.0 and 2.2.23. It is advised that the patched versions are applied at the earliest convenience. Where not possible, the following should be addressed: Remove all sudo composer privileges for all users to mitigate root privilege escalation, and avoid running Composer within an untrusted directory, or if needed, 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 the following:```sh rm vendor/composer/installed.php vendor/composer/InstalledVersions.php composer install --no-scripts --no-plugins ```

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00279 20th percentileScored 2026-11-07
Fix Fixed composer (composer): 2.2.23, 2.7composer/composer (Packagist): 2.2.23, 2.7.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
composercomposer2.0 to before 2.2.23; 2.3 to before 2.72.2.23, 2.7Patch availableCNA
—composer/composer (Packagist)2.0.0-alpha1 to before 2.2.232.2.23Patch availableGHSA-7c6p-848j-wh5h
—composer/composer (Packagist)2.3.0-rc1 to before 2.7.02.7.0Patch availableGHSA-7c6p-848j-wh5h
  • composer Vendorcomposer Affected 2.0 to before 2.2.23; 2.3 to before 2.7 Fixed in 2.2.23, 2.7 Patch available CNA
  • composer/composer (Packagist) Vendor— Affected 2.0.0-alpha1 to before 2.2.23 Fixed in 2.2.23 Patch available GHSA-7c6p-848j-wh5h
  • composer/composer (Packagist) Vendor— Affected 2.3.0-rc1 to before 2.7.0 Fixed in 2.7.0 Patch available GHSA-7c6p-848j-wh5h

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*2.0.0 to before 2.2.23; 2.3.0 to before 2.7.0Vulnerablecomposer
  • cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:* Versions 2.0.0 to before 2.2.23; 2.3.0 to before 2.7.0 Vulnerable ·composer

Remediation

  • Fix · CNA composer (composer) Fixed in 2.2.23, 2.7
  • Fix · GHSA-7c6p-848j-wh5h composer/composer (Packagist) Fixed in 2.2.23 Advisory →
  • Fix · GHSA-7c6p-848j-wh5h composer/composer (Packagist) Fixed in 2.7.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-24821
  2. 2026-10-03 Alias added: GHSA-7c6p-848j-wh5h

References

  • TI-2015-06892 Composer before 2016-02-10 allows cache poisoning from other projects built on the same… CVSS 3.1HIGH 8.8
  • TI-2021-17955 Command injection in composer on Windows CVSS 3.1CRITICAL 9.8
  • TI-2021-10185 Code injection in composer CVSS 3.1HIGH 8.8
  • TI-2022-08641 Missing input validation can lead to command execution in composer CVSS 3.1HIGH 8.8
  • TI-2026-29055 Composer has Command Injection via Malicious Perforce Reference CVSS 3.1HIGH 8.8
  • TI-2023-23380 Remote Code Execution via web-accessible composer.phar CVSS 3.1HIGH 8.8
See all 8 →

Sources