CVE-2026-40176

composer: Composer is a dependency manager for PHP

CVE-2026-40176 is fixed in 2 products on 1 platform, first by DEBIAN-CVE-2026-40176, released April 15, 2026. It is not reported as exploited. Patch Radar priority: High.

High
CVSS
7.8
high
Exploitation
None reported
No vendor assessment
CISA KEV
Not listed
Not in the Known Exploited Vulnerabilities catalog
EPSS
0.0105
64th percentile

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).

Where it's fixed

ProductFixed inFixReleased
Linux
composer · Debian 12.15 (bookworm) 2.5.5-1+deb12u4 DEBIAN-CVE-2026-40176 Apr 15, 2026
composer · Debian 13.5 (trixie) 2.8.8-1+deb13u2 DEBIAN-CVE-2026-40176 Apr 15, 2026
composer · Debian 14 2.9.7-1 DEBIAN-CVE-2026-40176 Apr 15, 2026
composer · amzn 2023 2.9.7-1.amzn2023.0.1 ALAS2023-2026-1625 Apr 27, 2026
php-composer2 · opensuse-leap 16.0 2.8.9-160000.4.1 OPENSUSE-SU-2026:21520-1 Aug 3, 2026
php-composer2 · sles 15.6 2.6.4-150600.3.12.1 SUSE-SU-2026:3105-1 Jul 17, 2026
php-composer2 · sles 15.7 2.6.4-150600.3.12.1 SUSE-SU-2026:3105-1 Jul 17, 2026
php-composer2 · sles 16.0 2.8.9-160000.4.1 SUSE-SU-2026:23138-1 Aug 3, 2026

Patch Radar data is free to use with attribution. Terms and how to credit it.

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.