CVE-2024-35242

Composer vulnerable to command injection via malicious git/hg branch names

Published Jun 10, 2024 CVSS 3.1 · 8.8 High EPSS 3.3% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3838-1 composer security update
Debian DSA Debian DSA DSA-5715-1 composer security update
Github GHSA Github GHSA GHSA-v9qv-c7wm-wgmf Composer has multiple command injections via malicious git/hg branch names
Ubuntu USN Ubuntu USN USN-7603-1 Composer vulnerabilities
History
Type Values Removed Values Added
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. 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.
Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 13, 2025, 5:52 PM
Reserved
May 14, 2024, 3:39 PM
Status
Deferred
Published
Jun 10, 2024, 10:15 PM
Modified
Jun 17, 2026, 7:34 AM