PT-2026-32621

CVE-2026-40176

·

Published

2026-04-14

·

Updated

2026-08-18

Description by

CVSS 3.1
7.8
High
MetricsAV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions Composer versions 1.0 through 2.2.26 Composer versions 2.3 through 2.9.5
Description A command injection issue exists in the Perforce VCS driver of Composer, a dependency manager for PHP. The Perforce::generateP4Command() function constructs shell commands by interpolating user-supplied Perforce connection parameters without proper escaping. An attacker can inject arbitrary commands through the port, user, or client variables within a malicious 'composer.json' file that declares a Perforce VCS repository. This allows for arbitrary command execution in the context of the user running Composer, regardless of whether Perforce is installed on the system. This issue can be triggered when running Composer commands on untrusted projects. VCS repositories are only loaded from the root 'composer.json' or the composer config directory, meaning it cannot be exploited via dependency packages.
Recommendations Update to version 2.2.27 for versions 1.0 through 2.2.26. Update to version 2.9.6 for versions 2.3 through 2.9.5. Only run Composer commands on projects from trusted sources. Carefully inspect 'composer.json' files to verify that Perforce-related fields contain valid values before execution.
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-WG36-WVJ6-R67P
BIT-COMPOSER-2026-40176
CLSA-2026-1787064466
OPENSUSE-SU-2026:10643-1
OPENSUSE-SU-2026:20670-1
OPENSUSE-SU-2026:21520-1
RHSA-2026:8165
SUSE-SU-2026:1784-1
SUSE-SU-2026:1970-1
SUSE-SU-2026:21542-1
SUSE-SU-2026:23116-1
SUSE-SU-2026:23138-1
SUSE-SU-2026:3105-1
Found an issue in the description? Have something to add? Feel free to write us 👾