CVE-2024-24821
HIGHDescription
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 ```
How to fix
Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.
CVSS v3 Vector
Exploitability
Impact
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Exploit Intelligence
Low risk: more likely to be exploited than 19% of all known CVEs.
References
Related Vulnerabilities
Other CWE-829 vulnerabilities, ordered by exploit likelihood. View all
| CVE | Severity | CVSS | EPSS | Exploited | Fix |
|---|---|---|---|---|---|
| CVE-2018-17246 | Critical | 9.8 | 82% | - | Fix |
| CVE-2024-5762 | High | 8.1 | 72% | - | - |
| CVE-2018-7422 | High | 7.5 | 63% | - | - |
| CVE-2023-2249 | High | 8.8 | 61% | - | - |
| CVE-2025-32463 | Critical | 9.3 | 47% | KEV | Fix |
| CVE-2024-38476 | Critical | 9.8 | 42% | - | Fix |
Embed a live status badge for CVE-2024-24821
Markdown
[](https://tridentstack.com/cve/CVE-2024-24821)HTML
<a href="https://tridentstack.com/cve/CVE-2024-24821"><img src="https://tridentstack.com/cve/badge/CVE-2024-24821.svg" alt="CVE-2024-24821"></a>Find and fix vulnerabilities across your fleet
TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.
Start freeThis product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2024-11-21.