CVE-2024-35242
Composer vulnerable to command injection via malicious git/hg branch names
8.8CVSSHIGH
Description
Composer is a dependency manager for PHP. On the 2.x branch prior to versions 2.2.24 and 2.7.7, the `composer install` command running inside a git/hg repository which has specially crafted branch names can lead to command injection. This requires cloning untrusted repositories. Patches are available in version 2.2.24 for 2.2 LTS or 2.7.7 for mainline. As a workaround, avoid cloning potentially compromised repositories.
CVSS Vector Breakdown
Exploitability
AV:NAttack VectorNetwork
AC:LAttack ComplexityLow
PR:NPrivileges RequiredNone
UI:RUser InteractionRequired
Scope
S:UScopeUnchanged
Impact
C:HConfidentialityHigh
I:HIntegrityHigh
A:HAvailabilityHigh
Weaknesses
Affected Products
and 2 more affected products View all →
Attack Graph
Products CVE Techniques Tactics
Click technique nodes to view MITRE ATT&CK details. Scroll to zoom, drag to pan.
Exploitability
Official Patch Available
MITRE ATT&CK
1 technique Execution
References
https://github.com/composer/composer/security/advisories/GHSA-v9qv-c7wm-wgmf
github.com
https://github.com/composer/composer/commit/6bd43dff859c597c09bd03a7e7d6443822d0a396
github.com
https://github.com/composer/composer/commit/fc57b93603d7d90b71ca8ec77b1c8a9171fdb467
github.com
and 15 more references View all →
Timeline
Published
Jun 10, 2024
Last Updated
Feb 13, 2025
Unlock Complete Vulnerability Intelligence
Get the full picture for CVE-2024-35242 and every CVE in our database. Create a free account — no credit card required.
Create Free AccountPlain-language analysis
Impact assessment and exploitation scenario in plain English
Attack graph visualization
Interactive attack path and kill chain mapping
Exploit details & PoC links
ExploitDB, Metasploit, GitHub PoCs with direct links
Nuclei scanner templates
Ready-to-use vulnerability scanner templates
Full remediation guide
Patch instructions, workarounds, and compliance impact
Interactive AI chat
Ask questions about this vulnerability in natural language
Related vulnerabilities
Semantically similar CVEs and attack patterns
REST API & MCP access
Integrate vulnerability data into your workflows