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

CVE-2024-35241: Composer has a command injection via malicious git branch name

highCVSS 3.1 8.8GHSA-47f6-5gq3-vx9c

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.

Published Jun 10, 2024 · Updated Apr 23, 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 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.

Credited to martinhaunschmid.

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