HOMEVULNERABILITIESCVE-2026-40176
HIGH

CVE-2026-40176

CWE-20Published: April 15, 2026· Updated: Apr 17, 2026

7.8
CVSS v3.1
EPSS:0.01%probability of exploitation in 30 daysPercentile:1.0th

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

NVD Source

Technical Analysis

CVE-2026-40176 requires local access, meaning attackers must already have a foothold on the target system.

Exploitation does not require any privileges, though user interaction (Required) is needed, which slightly reduces the risk of mass automated attacks.

A successful exploit results in complete confidentiality breach (data exposure), full integrity compromise (data manipulation), availability disruption (denial of service), with a CVSS base score of 7.8.

CVSS v3.1 Vector Breakdown

Exploitability
Attack VectorLocal
Attack ComplexityLow
Privileges Req.None
User InteractionRequired
ScopeUnchanged
Impact
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected Vendors & Products

Mentioned vendors (from description):
PHP
CPE data not yet available in NVD for this CVE.

Exploit & PoC Resources

NO KNOWN EXPLOITNo public exploit confirmed at this time
External links open in a new tab. Always verify in a controlled environment before use.

News & Research Mentioning CVE-2026-40176

New PHP Composer Flaws Enable Arbitrary Command Execution — Patches Released
The Hacker News· Apr 14, 2026

Two high-severity security vulnerabilities have been disclosed in Composer, a package manager for PHP, that, if successfully exploited, could result in arbitrary command execution. The vulnerabilities have been described as command injection flaws affecting the Perforce VCS (version control software) driver. Details of the two flaws are below - CVE-2026-40176 (CVSS [xlite_meta score:50 src:The Hacker News xlite_fp:f8304b5455a36db4ebbff79578e6f5bbbfa25136677f287512ee8aa291d178ac]

All References (2)

Quick Facts

CVE IDCVE-2026-40176
CVSS Score7.8 / 10
SeverityHIGH
WeaknessCWE-20
CISA KEVNo
EPSS (30d)0.01%
PublishedApr 15, 2026

Related CVEs (CWE-20)

Recommended Actions

  • Apply vendor patches immediately
  • Monitor CVE-2026-40176 in threat intel feeds
  • Review IDS/IPS signatures for exploitation attempts
Data sourced from NVD (NIST), CISA KEV, and EPSS (FIRST). Analysis generated by CTIWATCH.COM. CVE data is provided under the NVD usage policy.
CVE-2026-40176 — CVSS 7.8 HIGH | CTIWATCH.COM