CVE-2024-35241 — Vulnerability in composer/composer — CVE Details
Composer has a command injection via malicious git branch name
Summary
Advisory Timeline
- First published June 10, 2024 (854 days ago).
- Last revised September 10, 2026 — 821 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "composer/composer:^2.2.24"
composer require "composer/composer:^2.7.7"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: packagist (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| composer/composer | packagist | 2.0.0, 2.0.0-RC1, 2.0.0-RC2, 2.0.0-alpha1 (+56 more) | 2.2.24 |
| composer/composer | packagist | 2.3.0, 2.3.0-RC1, 2.3.0-RC2, 2.3.1 (+38 more) | 2.7.7 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-77
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/composer/composer/security/advisories/GHSA-47f6-5gq3-vx9cWEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-35241ADVISORY
- https://github.com/composer/composer/commit/b93fc6ca437da35ae73d667d0618749c763b67d4WEB
- https://github.com/composer/composer/commit/ee28354ca8d33c15949ad7de2ce6656ba3f68704WEB
- https://github.com/composer/composerPACKAGE
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PO4MU2BC7VR6LMHEX4X7DKGHVFXZV2MCWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VLPJHM2WWSYU2F6KHW2BYFGYL4IGTKHCWEB
- https://www.vicarius.io/vsociety/posts/cve-2024-35241-detect-composer-vulnerabilityWEB
- https://www.vicarius.io/vsociety/posts/cve-2024-35241-mitigate-vulnerable-composerWEB
Frequently Asked Questions
- What is CVE-2024-35241?
- Composer has a command injection via malicious git branch name This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2024-35241?
- CVE-2024-35241 affects composer/composer. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-35241 and 200,000+ other known vulnerabilities.
Severity & Exploitability
High exploitability or significant impact. Prioritize remediation within days.
Also Known As
Related CVEs
- CVE-2026-40261HIGH
Composer has a command injection via malicious perforce reference
- CVE-2026-65954HIGH
PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()
- CVE-2026-84361HIGH
Composer arbitrary command execution via a malicious package's Perforce source URL
- CVE-2024-35242HIGH
Composer has multiple command injections via malicious git/hg branch names
- CVE-2026-61825HIGH
code16/sharp has a stored XSS via data-html-content Sanitizer Bypass
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies