# CVE-2024-35241: Composer vulnerable to command injection via malicious git branch name

- Priority: **Routine**
- Reason: Not severe (CVSS 8.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-06-10 · Modified: 2025-04-21
- Aliases: UBUNTU-CVE-2024-35241, DEBIAN-CVE-2024-35241, CGA-9xff-5wvp-wf49, CGA-rq68-hqwg-7wxp, ALPINE-CVE-2024-35241
- Record: https://cvemate.com/vulnerability/CVE-2024-35241 · JSON: https://cvemate.com/vulnerability/CVE-2024-35241/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 1.05%, percentile 65.362%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine composer (Alpine Linux): \< 2.7.7-r0
- chainguard composer (Chainguard): \< 2.7.7-r0
- wolfi composer (Wolfi): \< 2.7.7-r0
- composer composer: ≥ 2.0, \< 2.2.24 \| ≥ 2.3, \< 2.7.7
- debian composer (Debian): \< 2.5.5-1+deb12u2 \| \< 2.7.7-1
- ubuntu composer (Ubuntu): \< 1.0.0~beta2-1ubuntu0.1~esm2 \| \< 1.6.3-1ubuntu0.1~esm2 \| \< 1.10.1-1ubuntu0.1~esm2 \| \< 2.2.6-2ubuntu4+esm1 \| \< 2.7.1-2ubuntu0.1~esm1

## References

- <https://github.com/composer/composer/security/advisories/GHSA-47f6-5gq3-vx9c>
- <https://github.com/composer/composer/commit/b93fc6ca437da35ae73d667d0618749c763b67d4>
- <https://github.com/composer/composer/commit/ee28354ca8d33c15949ad7de2ce6656ba3f68704>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHC/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MC/>
- <https://www.vicarius.io/vsociety/posts/cve-2024-35241-detect-composer-vulnerability>
- <https://www.vicarius.io/vsociety/posts/cve-2024-35241-mitigate-vulnerable-composer>
- <https://ubuntu.com/security/CVE-2024-35241>
- <https://www.cve.org/CVERecord?id=CVE-2024-35241>
- <https://ubuntu.com/security/notices/USN-7603-1>
- <https://security-tracker.debian.org/tracker/CVE-2024-35241>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35241.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-35241>
- <https://security.alpinelinux.org/vuln/CVE-2024-35241>

---

Data as of 2026-12-05T05:21:39.400Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
