#VU125894 OS Command Injection in composer - CVE-2026-40261

 

#VU125894 OS Command Injection in composer - CVE-2026-40261

Published: April 14, 2026


Vulnerability identifier: #VU125894
Vulnerability risk: High
CVSSv4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Amber
CVE-ID: CVE-2026-40261
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vulnerable software:
composer
Software vendor:
getcomposer.org

Description

The vulnerability allows a remote attacker to execute arbitrary commands.

The vulnerability exists due to command injection in the Perforce::syncCodeBase() and Perforce::generateP4Command() methods when processing package metadata containing a crafted Perforce source reference or source url. A remote attacker can supply a malicious package through a Composer repository to execute arbitrary commands.

The issue is exploitable when installing or updating dependencies from source, including with --prefer-source and by default for dev prefixed versions. User interaction is required to install or update the dependency.


Remediation

Install security update from vendor's website.

External links