PT-2024-4386 · Composer+5 · Composer+5

Martinhaunschmid

+1

·

Published

2024-06-10

·

Updated

2025-06-30

·

CVE-2024-35241

CVSS v2.0

10

High

VectorAV:N/AC:L/Au:N/C:C/I:C/A:C
Name of the Vulnerable Software and Affected Versions Composer versions prior to 2.2.24 and 2.7.7
Description The issue is related to the incorrect neutralization of special elements in the getUnpushedChanges() function of the Composer dependency manager for PHP. This can allow a remote attacker to execute arbitrary commands using the status, reinstall, and remove commands with packages installed from source via git containing specially crafted branch names in the repository.
Recommendations For versions prior to 2.2.24, update to version 2.2.24 for the 2.2 LTS branch. For versions prior to 2.7.7, update to version 2.7.7 for the mainline branch. As a temporary workaround, avoid installing dependencies via git by using --prefer-dist or the preferred-install: dist config setting.

Exploit

Fix

Command Injection

Weakness Enumeration

Related Identifiers

BDU:2024-04878
BIT-COMPOSER-2024-35241
CVE-2024-35241
DLA-3838-1
DSA-5715-1
DSA-5715-2
GHSA-47F6-5GQ3-VX9C
OPENSUSE-SU-2024:14040-1
OPENSUSE-SU-2024_2106-1
OPENSUSE-SU-2024_2107-1
SUSE-SU-2024:2106-1
SUSE-SU-2024:2107-1
SUSE-SU-2024_2106-1
SUSE-SU-2024_2107-1
SUSE-SU-2026:1970-1
USN-7603-1

Affected Products

Astra Linux
Composer
Linuxmint
Red Os
Suse
Ubuntu