Description
Composer is a dependency manager for PHP. Versions 1.0 through 2.2.26 and 2.3 through 2.9.5 contain a command injection vulnerability in the Perforce::generateP4Command() method, which constructs shell commands by interpolating user-supplied Perforce connection parameters (port, user, client) without proper escaping. An attacker can inject arbitrary commands through these values in a malicious composer.json declaring a Perforce VCS repository, leading to command execution in the context of the user running Composer, even if Perforce is not installed. VCS repositories are only loaded from the root composer.json or the composer config directory, so this cannot be exploited through composer.json files of packages installed as dependencies. Users are at risk if they run Composer commands on untrusted projects with attacker-supplied composer.json files. This issue has been fixed in Composer 2.2.27 (2.2 LTS) and 2.9.6 (mainline).
Mitigation
Minimal update. May introduce new vulnerabilities or breaking changes.
|
 debian 14 | | =2.8.10-1 || =2.8.11-1 || =2.8.11-2 || =2.8.12-1 || =2.8.8-1 || =2.8.9-1 || =2.9.0~rc1-1 || =2.9.1-1 || =2.9.2-1 || =2.9.3-1 || =2.9.4-1 || =2.9.5-1 || >=0 <2.9.7-1 | 2.9.7-1 |
 debian 12 | | =2.5.5-1 || =2.5.5-1+deb12u1 || =2.5.5-1+deb12u2 || =2.5.5-1+deb12u3 || >=0 <2.5.5-1+deb12u4 | 2.5.5-1+deb12u4 |
 debian 13 | | =2.8.8-1 || =2.8.8-1+deb13u1 || >=0 <2.8.8-1+deb13u2 | 2.8.8-1+deb13u2 |
 packagist | | >=2.3.0 <2.9.6 || >=1.0.0 <2.2.27 | 2.9.6, 2.2.27 |
 debian 11 | | =2.0.11-1 || =2.0.12-1 || =2.0.13-1 || =2.0.14-1 || =2.0.9-2 || =2.0.9-2+deb11u1 || =2.0.9-2+deb11u2 || =2.0.9-2+deb11u3 || =2.0.9-2+deb11u4 || =2.1.10-1 || =2.1.11-1 || =2.1.12-1 || =2.1.14-1 || =2.1.3-1 || =2.1.9-1 || =2.10.0-1 || =2.10.0~rc1-1 || =2.10.0~rc1-2 || =2.10.0~rc1-3 || =2.10.0~rc2-1 || =2.10.1-1 || =2.10.1-2 || =2.10.2-1 || =2.2.0~rc1-1 || =2.2.1-1 || =2.2.1-2 || =2.2.11-1 || =2.2.12-1 || =2.2.13-1 || =2.2.14-1 || =2.2.2-1 || =2.2.3-1 || =2.2.4-1 || =2.2.5-1 || =2.2.6-1 || =2.2.6-2 || =2.2.7-1 || =2.2.9-1 || =2.3.10-1 || =2.3.7-1 || =2.3.7-2 || =2.3.8-1 || =2.3.9-1 || =2.4.0-1 || =2.4.0~rc1-1 || =2.4.1-1 || =2.4.2-1 || =2.4.3-1 || =2.4.4-1 || =2.5.1-1 || =2.5.2-1 || =2.5.3-1 || =2.5.4-1 || =2.5.5-1 || =2.5.6-1 || =2.5.7-1 || =2.5.8-1 || =2.6.2-1 || =2.6.3-1 || =2.6.4-1 || =2.6.5-1 || =2.6.6-1 || =2.7.1-1 || =2.7.1-2 || =2.7.2-1 || =2.7.4-1 || =2.7.6-1 || =2.7.6-2 || =2.7.6-3 || =2.7.7-1 || =2.7.7-2 || =2.7.8-1 || =2.7.9-1 || =2.8.0-1 || =2.8.1-1 || =2.8.10-1 || =2.8.11-1 || =2.8.11-2 || =2.8.12-1 || =2.8.2-1 || =2.8.3-1 || =2.8.4-1 || =2.8.4-2 || =2.8.4-3 || =2.8.5-1 || =2.8.6-1 || =2.8.8-1 || =2.8.9-1 || =2.9.0~rc1-1 || =2.9.1-1 || =2.9.2-1 || =2.9.3-1 || =2.9.4-1 || =2.9.5-1 || =2.9.7-1 || =2.9.8-1 | - |