NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Composer (PHP)

CVE-2024-35242: Composer has multiple command injections via malicious git/hg branch names

highCVSS 3.1 8.8GHSA-v9qv-c7wm-wgmf

Impact The composer install command running inside a git/hg repository which has specially crafted branch names can lead to command injection. So this requires cloning untrusted repositories. Patches 2.2.24 for 2.2 LTS or 2.7.7 for mainline Workarounds Avoid cloning potentially compromised repositories.

Published Jun 10, 2024 · Updated Feb 13, 2025

Affected packages

composer/composer

Ecosystem
Composer (PHP)
Affected
>= 2.0, < 2.2.24
Fixed in
2.2.24
Check
composer show composer/composer

composer/composer

Ecosystem
Composer (PHP)
Affected
>= 2.3, < 2.7.7
Fixed in
2.7.7
Check
composer show composer/composer

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

The composer install command running inside a git/hg repository which has specially crafted branch names can lead to command injection. So this requires cloning untrusted repositories.

Patches

2.2.24 for 2.2 LTS or 2.7.7 for mainline

Workarounds

Avoid cloning potentially compromised repositories.

Credited to haqpl.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Composer (PHP) vulnerabilities

All Composer (PHP) entries