CVE-2024-35241: Composer - Remote Code Execution
- Cve: CVE-2024-35241
- Name: Composer - Remote Code Execution
- Description: Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, the `status`, `reinstall` and `remove` commands with packages installed from source via git containing specially crafted branch names in the repository can be used to execute code. Patches for this issue are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid installing dependencies via git by using `--prefer-dist` or the `preferred-install: dist` config setting.
- Impact: Attackers can execute arbitrary code on the system by exploiting crafted branch names in git repositories during package management operations.
- Remediation: Update to version 2.2.24 or 2.7.7, or avoid installing dependencies via git by using `--prefer-dist` or setting `preferred-install: dist`.
- Vulnerability type: command_injection
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Epss score: 0.0105
- Epss percentile: 0.65109
- Assignee: [email protected]
- Published at: 2024-06-10T22:15:09Z
- Age in days: 897
- Modified at: 2026-06-17T07:34:36Z
- Patch available: yes
- References total: 7
- Products total: 2
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-35241
- Nvd status: deferred
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-77 | Improper Neutralization of Special Elements used in a Command |
References
Same in every row:
- Source: nvd
- Tags:
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| getcomposer:composer | >= 2.3, < 2.7.7; = 2.3; >= 2.0, < 2.2.24; = 2.0 | no | adp_cpes, cna_alias_text | /v1/products/getcomposer/composer |
| fedoraproject:fedora | = 40, = 39 | no | adp_cpes | /v1/products/fedoraproject/fedora |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| composer/composer | commit, fix, package, security_advisory | yes | /v1/repositories/composer/composer |
Index
- Repositories: 3
- Repositories high signal: 2
- Packages: 1
Exploitation
- Remote: yes
- Exposed hosts: 49161
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports