Back
CVE-2024-35241
Composer vulnerable to command injection via malicious git branch name
High8.8EPSS 1.1%
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVDNVD · Deferred | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 1.1% · top 36% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
Loading the EPSS history…
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.
Weakness
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistcomposer/composerGHSA-47f6-5gq3-vx9c (opens in a new tab)
References (7)
- https://github.com/composer/composer/security/advisories/GHSA-47f6-5gq3-vx9c (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/composer/composer/commit/b93fc6ca437da35ae73d667d0618749c763b67d4 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/composer/composer/commit/ee28354ca8d33c15949ad7de2ce6656ba3f68704 (opens in a new tab)x_refsource_MISCx_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHC/ (opens in a new tab)x_transferred
- https://lists.fedoraproject.org/archives/list/[email protected]/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MC/ (opens in a new tab)x_transferred
- https://www.vicarius.io/vsociety/posts/cve-2024-35241-detect-composer-vulnerability (opens in a new tab)
- https://www.vicarius.io/vsociety/posts/cve-2024-35241-mitigate-vulnerable-composer (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-47f6-5gq3-vx9c (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2024-35241)Record last updated .