CVE-2024-24821: Code execution and possible privilege escalation via compromised InstalledVersions.php or installed.php in Composer
Noroxi assessment
Priority: Monitor (action score 31/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.27% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: composer (Alpine:v3.19) 2.7.0-r0; composer (Debian:11) 2.0.9-2+deb11u2; composer (Debian:12) 2.5.5-1+deb12u1.
Low priority for now. Upgrade to composer (Alpine:v3.19) 2.7.0-r0; composer (Debian:11) 2.0.9-2+deb11u2; composer (Debian:12) 2.5.5-1+deb12u1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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 ```
- Published
- Feb 8, 2024
- Updated
- Jun 17, 2026
- EPSS
- 0.2% · 20th percentile
- CWE
- CWE-829
Report tools
Action score
31
Low priority for now.
- CVSS
- 31 / 40 · 7.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.2%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 7.8
- CNA · GitHub_M
- 8.8
- 1.0 point gap
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| getcomposer | composer | cpe:2.3:a:getcomposer:composer |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
composer composer
- >= 2.0, < 2.2.23, >= 2.3, < 2.7affected
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- getcomposer composer2.0.0 and later · before 2.2.23
- getcomposer composer2.3.0 and later · before 2.7.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.19 | composer | from 2.0.0 · before 2.7.0-r0 | 2.7.0-r0 |
| Debian:11 | composer | before 2.0.9-2+deb11u2 | 2.0.9-2+deb11u2 |
| Debian:12 | composer | before 2.5.5-1+deb12u1 | 2.5.5-1+deb12u1 |
| Debian:13 | composer | before 2.7.1-1 | 2.7.1-1 |
| openSUSE:Leap 15.5 | php-composer2 | before 2.2.3-150400.3.9.1 | 2.2.3-150400.3.9.1 |
| openSUSE:Tumbleweed | php-composer2 | before 2.7.1-1.1 | 2.7.1-1.1 |
| Packagist | composer/composer | from 2.0.0-alpha1 · before 2.2.23 | 2.2.23 |
| Packagist | composer/composer | from 2.3.0-rc1 · before 2.7.0 | 2.7.0 |
| SUSE:Linux Enterprise Module for Web and Scripting 15 SP5 | php-composer2 | before 2.2.3-150400.3.9.1 | 2.2.3-150400.3.9.1 |
Same product
getcomposer: all recordsOther highest-scoring records for the same primary product.
- CVE-2021-41116Command injection in composer on Windows40Plan
- CVE-2026-40261Composer has Command Injection via Malicious Perforce Reference36Monitor
- CVE-2022-24828Missing input validation can lead to command execution in composer36Monitor
Published before and after this one in the same product
- ← EarlierCVE-2015-8371Sep 21, 2023 · Composer before 2016-02-10 allows cache poisoning from other projects built on the same host.35Monitor
- ← EarlierCVE-2023-43655Sep 29, 2023 · Remote Code Execution via web-accessible composer.phar35Monitor
- Later →CVE-2025-67746Dec 30, 2025 · Composer vulnerable to ANSI sequence injection5Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:composer | 2.7.0-r0 · Alpine:v3.19 | Package registry (OSV) |
| debian:composer | 2.5.5-1+deb12u1 · Debian:12 | Package registry (OSV) |
| opensuse:php-composer2 | 2.2.3-150400.3.9.1 · openSUSE:Leap 15.5 | Package registry (OSV) |
| Packagist:composer/composer | 2.2.23 | Package registry (OSV) |
| Packagist:composer/composer | 2.7.0 | Package registry (OSV) |
| suse:php-composer2 | 2.2.3-150400.3.9.1 · SUSE:Linux Enterprise Module for Web and Scripting 15 SP5 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-829 · Inclusion of Functionality from Untrusted Control SphereCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Code InclusionCAPEC-175likelihood: Medium · Very High
- Serialized Data External LinkingCAPEC-201likelihood: High · High
- DTD InjectionCAPEC-228Medium
- Local Code InclusionCAPEC-251Medium
- PHP Local File InclusionCAPEC-252Medium
- Remote Code InclusionCAPEC-253
- Force Use of Corrupted FilesCAPEC-263Medium
- Open-Source Library ManipulationCAPEC-538likelihood: Low · High
ATT&CK techniques
- Process InjectionT1055
- Browser ExtensionsT1176
- Supply Chain Compromise: Software Dependencies and Development ToolsT1195.001
- Server Software Component: IIS ComponentsT1505.004
- Server Software Component: Terminal Services DLLT1505.005
- Hijack Execution Flow: Dynamic Linker HijackingT1574.006
- Hijack Execution Flow: KernelCallbackTableT1574.013
- Reflective Code LoadingT1620
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (1 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.