CVE-2024-24821: composer
Vulnerability summary
CVE-2024-24821 is a high (CVSS 8.8) vulnerability in composer. EPSS estimates a 0.28% chance of exploitation in the next 30 days, higher than 19.1% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 1 · Related 1Timeline
- 08-02-2024PublishedVulnerability first disclosed.
- 17-06-2025Last modifiedVulnerability information updated.
Description
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 ```
CVSS metrics
4 scores · 4 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HDiffers
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HDiffers
- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HDiffers
EPSS trend
Probability
0.28%
Chance of exploitation in the next 30 days
Percentile
19%
Versus all other CVEs
30-day change
0.00 pp
From 0.28% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Suse6 products
- php-composer2&distro=SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS< 2.2.3-150400.3.9.1
- php-composer2&distro=SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS< 2.2.3-150400.3.9.1
- php-composer2&distro=SUSE Linux Enterprise Module for Web and Scripting 15 SP5< 2.2.3-150400.3.9.1
- php-composer2&distro=SUSE Linux Enterprise Server 15 SP4-LTSS< 2.2.3-150400.3.9.1
- php-composer2&distro=SUSE Linux Enterprise Server for SAP Applications 15 SP4< 2.2.3-150400.3.9.1
Opensuse2 products
- php-composer2&distro=openSUSE Leap 15.5< 2.2.3-150400.3.9.1
- php-composer2&distro=openSUSE Tumbleweed< 2.7.1-1.1
Composer1 product
- composer≥ 2.0, < 2.2.23 | ≥ 2.3, < 2.7
Debian1 product
- composer< 2.7.1-1 | < 2.0.9-2+deb11u2 | < 2.5.5-1+deb12u1
Getcomposer1 product
- composer≥ 2.0.0, < 2.2.23 | ≥ 2.3.0, < 2.7.0
Ubuntu1 product
- composer< 2.2.6-2ubuntu4+esm1
6 vendors · 12 products
References
9 links- github.com/composer/composer/security/advisories/GHSA-7c6p-848j-wh5hX Refsource CONFIRMREPORTThird Party Advisory
- github.com/composer/composer/commit/64e4eb356b159a30c766cd1ea83450a38dc23bf5X Refsource MISCREPORTPatch