BIT-composer-2026-40176: Composer is vulnerable to Command Injection via Malicious Perforce Repository
Affects composerSource GCVE Database
Not known to be exploited : upgrade to 2.9.6 or 2.2.27 soon.
Data as of 25 Oct 2026, 19:02 UTC
Rated by Threat Radar · No CVSS score from NVD or the CNA
- EPSS
- 1.0% chance of exploitation in 30 days – higher than 63% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 2.9.6, 2.2.27
Exploitation evidence
Disclosed: evidence found.
CVE published 18 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Upgrade composer to 2.9.6 or 2.2.27.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Bitnamicomposerpkg:bitnami/composerOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in Composer versions 2.2.27 and 2.9.6. Users should upgrade to one of these versions or later to remediate this vulnerability. Avoid running Composer commands on untrusted projects or with untrusted composer.json files until patched.
Description
Composer, a PHP dependency manager, contains a command injection vulnerability in versions 1.0 through 2.2.26 and 2.3 through 2.9.5. The vulnerability exists in the Perforce::generateP4Command() method, which improperly escapes user-supplied Perforce connection parameters. An attacker can exploit this by crafting a malicious composer.json file declaring a Perforce VCS repository, leading to arbitrary command execution with the privileges of the user running Composer. This issue cannot be exploited through composer.json files of dependencies, only from the root composer.json or composer config directory. The vulnerability is fixed in versions 2.2.27 and 2.9.6.
References
- github.com/composer/composer/releases/tag/2.9.6 (opens in a new tab)
- github.com/composer/composer/security/advisories/GHSA-wg36-wvj6-r67p (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-40176 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:8165 (opens in a new tab)
- access.redhat.com/security/cve/CVE-2026-40176 (opens in a new tab)
- bugzilla.redhat.com/show_bug.cgi?id=2458828 (opens in a new tab)
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40176.json (opens in a new tab)