8.8

CVE-2024-24821: Code execution and possible privilege escalation via compromised InstalledVersions.php or installed.php in Composer

Modified
AliasesSUSE-SU-2024:0592-1UBUNTU-CVE-2024-24821DEBIAN-CVE-2024-24821
Published 08-02-2024Last modified 17-06-2025

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 21.8% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 8.8, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
8.8/10
010
High · v3.1 (CVE.org)
EPSS score
0.28%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 1 · Related 1

Timeline

  1. 08-02-2024
    PublishedVulnerability first disclosed.
  2. 17-06-2025
    Last 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

5 scores · 5 sources · 1 version

EPSS trend

Probability

0.28%

Chance of exploitation in the next 30 days

Percentile

22%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.28% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

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
Alpine1 product
  • composer≥ 2.0.0, < 2.7.0-r0 | ≥ 2.3.0, < 2.7.0-r0
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

7 vendors · 13 products

References

10 links