CVE-2024-35241
highpriority · track · 0EPSS 0.011 · 64 %ileEURUUSEPSS · scored 2026-10-23
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (14)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-47f6-5gq3-vx9cComposer has a command injection via malicious git branch name2024-06-10ghsa · osvUS
### Impact 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 2.2.24 for 2.2 LTS or 2.7.7 for mainline ### Workarounds Avoid installing dependencies via git by using `--prefer-dist` or the `preferred-install: dist` config setting.
- BIT-composer-2024-35241Composer vulnerable to command injection via malicious git branch name2024-06-12vendor · osvUS
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.
also known as (6)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (20)
External citations — patches, advisories, analysis.
- https://cxsecurity.com/cveshow/CVE-2024-35241/cnnvd
- https://github.com/composer/composer/commit/b93fc6ca437da35ae73d667d0618749c763b67d4cnnvd
- https://github.com/composer/composer/commit/ee28354ca8d33c15949ad7de2ce6656ba3f68704cnnvd
- https://github.com/composer/composer/security/advisories/GHSA-47f6-5gq3-vx9ccnnvd
- https://github.com/composer/composer/security/advisories/GHSA-v9qv-c7wm-wgmfPatchcnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MC/cnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHC/cnnvd
- https://vigilance.fr/vulnerability/Composer-code-execution-via-status-install-remove-44543cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan