CVE-2024-24821
published high CVSS 3.1 · 8.8Code execution and possible privilege escalation via compromised InstalledVersions.php or installed.php in Composer
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| composer | — | composer>= 2.0, < 2.2.23 · >= 2.3, < 2.7 | Affected | Not stated | GitHub_M |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2024-539 | Fixed | Not stated | Amazon Linux assessment |
| Alpine Linux | edge | composer | Fixed | 2.7.0-r0 | Package fix record |
| Debian | bookworm | composer | Advisory build | 2.5.5-1+deb12u1 | DSA-5632-1 |
| Ubuntu | jammy | composer | Advisory build | 2.2.6-2ubuntu4+esm1 | USN-7603-1 |
| SUSE / openSUSE | SLE-15-SP4 | php-composer2noarch | Advisory build | 2.2.27-150400.3.18.1 | SUSE-SU-2026:1970-1 |
| Amazon Linux | AL2023 | composernoarch | Listed in advisory | Not stated | ALAS2023-2024-539 |
| Alpine Linux | v3.19 | composer | Fixed | 2.7.0-r0 | Package fix record |
Show 15 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.20 | composer | Fixed | 2.7.0-r0 | Package fix record |
| Alpine Linux | v3.21 | composer | Fixed | 2.7.0-r0 | Package fix record |
| Alpine Linux | v3.22 | composer | Fixed | 2.7.0-r0 | Package fix record |
| Alpine Linux | v3.23 | composer | Fixed | 2.7.0-r0 | Package fix record |
| Alpine Linux | v3.24 | composer | Fixed | 2.7.0-r0 | Package fix record |
| Debian | bullseye | composer | Advisory build | 2.0.9-2+deb11u2 | DSA-5632-1 |
| SUSE / openSUSE | SLE-15-SP4 | php-composer2noarch | Advisory build | 2.2.3-150400.3.9.1 | SUSE-SU-2024:0592-1 |
| SUSE / openSUSE | SLE-15-SP5 | php-composer2noarch | Advisory build | 2.2.27-150400.3.18.1 | SUSE-SU-2026:1970-1 |
| SUSE / openSUSE | SLE-15-SP5 | php-composer2noarch | Advisory build | 2.2.3-150400.3.9.1 | SUSE-SU-2024:0592-1 |
| SUSE / openSUSE | openSUSE-Leap-15.5 | php-composer2noarch | Advisory build | 2.2.3-150400.3.9.1 | SUSE-SU-2024:0592-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composer2aarch64 | Advisory build | 2.7.1-1.1 | OPENSUSE-SU-2024:13681-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composer2ppc64le | Advisory build | 2.7.1-1.1 | OPENSUSE-SU-2024:13681-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composer2s390x | Advisory build | 2.7.1-1.1 | OPENSUSE-SU-2024:13681-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | php-composer2x86_64 | Advisory build | 2.7.1-1.1 | OPENSUSE-SU-2024:13681-1 |
| Amazon Linux | AL2023 | composersrc | Listed in advisory | Not stated | ALAS2023-2024-539 |
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 ```
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.8 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| composer | composer | >= 2.0, < 2.2.23 (affected)>= 2.3, < 2.7 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-829 CWE-829: Inclusion of Functionality from Untrusted Control Sphere
References
2Provider assertions
3GitHub_M · cna
Code execution and possible privilege escalation via compromised InstalledVersions.php or installed.php in Composer
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 59ef5bcd64dd8b984793adbbc062ef1f1b99f2e22fb5218d5299ed4478261c42
- Ingested
- 23 Sep 2026, 08:19:54 UTC
- Source record
- Official CVE record