Predictive Vulnerability Intelligence.

Product

  • Product
  • Pricing
  • Documentation

Company

  • About
  • Partnerships
  • Blog
  • Support

Legal

  • Terms
  • Privacy
  • Data Licensing

© 2026 FAUCET Technologies LLC. All rights reserved.

CVE-2026-40176

34
FAUCET Score

OVERVIEW CVE-2026-40176 is a command injection vulnerability in Composer, a PHP dependency manager affecting versions 1.0 through 2.2.26 and 2.3 through 2.9.5. The flaw exists in the Perforce::generateP4Command() method, which fails to properly escape user-supplied Perforce connection parameters (port, user, client) when constructing shell commands. An attacker can inject arbitrary commands through a malicious composer.json file declaring a Perforce VCS repository, resulting in command execution under the privileges of the user running Composer, regardless of whether Perforce is actually installed on the system. SEVERITY The vulnerability carries a CVSS 3.1 score of 7.8 (HIGH) with a local attack vector, low attack complexity, no privilege requirements, and user interaction needed. The impact is severe, allowing an attacker to achieve complete compromise through high confidentiality, integrity, and availability impacts. The attack requires the victim to run Composer commands on an untrusted project, which represents a realistic scenario for developers working with shared or downloaded codebases. Exploitation is restricted to VCS repositories declared in root composer.json files or the composer config directory, preventing exploitation through transitive dependencies. EXPLOITATION STATUS There is no indication of active exploitation in the wild. The EPSS score of 0.00011 indicates very low probability of exploitation, and the vulnerability is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is currently available, and community attention remains minimal as reflected by the inactive status on relevant tracking lists. Users should prioritize patching by updating to Composer 2.2.27 (LTS) or 2.9.6 (mainline) to remediate this risk.

Impacted Technologies

VendorProductVersion(s)CPE
>= 1.0.0, <= 2.2.26CPE matchmatch criteria
cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*
>= 2.3.0, <= 2.9.5CPE matchmatch criteria
cpe:2.3:a:getcomposer:composer:*:*:*:*:*:*:*:*

CVSS Data

CVSS version used by this source: 3.1

7.8HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
Exploitability Score
1.8
Impact Score
5.9
CvssVersion
3.1

Exploit Intelligence

EPSS Score
1.06%
Probability of exploitation in next 30 days
EPSS Percentile
61.2%
Percentile rank of EPSS score among Peer Group
As of 2026-07-25
Model: v2026.06.15
This CVE's current EPSS score of 0.0106 is in the 59th percentile among its peer group of 11,616 CVEs.

Social Chatter

The average CVE in this peer group has 0.0 Twitter, 0.1 Reddit, 0.1 Bluesky, 0.0 Mastodon, and 0.2 GitHub mentions.

Media Mentions

The average CVE in this peer group has 0.3 InfoSec Media, 0.0 Vendor Blog, and 0.0 Security Researcher mentions.

Remediation

Patch Available

Vendor Patches (3)

composerpatch availablevia ghsa
Product: composer/composerFixed in: 2.9.6
composerpatch availablevia ghsa
Product: composer/composerFixed in: 2.2.27
github_advisoryvendor investigatingvia nvd_reference
View patch

Vendor Advisories (1)

composerGHSA-wg36-wvj6-r67phigh

Composer has a command injection via malicious perforce repository

Apr 14, 2026

References

access.redhat.com / errata/RHSA-2026:8165
access.redhat.com / security/cve/CVE-2026-40176
bugzilla.redhat.com / show_bug.cgi
security.access.redhat.com / data/csaf/v2/vex/2026/cve-2026-40176.json
github.com / composer/composer/releases/tag/2.9.6
Release Notes
github.com / composer/composer/security/advisories/GHSA-wg36-wvj6-r67p
Vendor Advisory