CVE-2024-35241Composer vulnerable to command injection via malicious git branch name
- 8.8HighCVSS base score
- 1.1%Exploitation in 30 daysEPSS · top 35% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 27 days later
· 27 days later
Published
- 11 months later
· 11 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
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 35% of all CVEs (13 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistcomposer/composerGHSA-47f6-5gq3-vx9c (opens in a new tab)
References
References7
- 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)
- EUVD EUVD-2024-1909 (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://cveledger.app/cve/CVE-2024-35241)Record last updated .