Skip to main content
CVE-2026-40176VulnerabilityPublished Updated

BIT-composer-2026-40176: Composer is vulnerable to Command Injection via Malicious Perforce Repository

Affects composerSource GCVE Database

0

Not known to be exploited : upgrade to 2.9.6 or 2.2.27 soon.

Data as of 25 Oct 2026, 19:02 UTC

Severity
High

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

  1. Disclosed: evidence found.

    CVE published 18 Apr 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Bitnamicomposerpkg:bitnami/composerOther threatsAffected
  • >=1.0.0 <2.2.27
  • >=2.3.0 <2.9.6
Fixed in
  • 2.2.27
  • 2.9.6

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

Community reviews

Loading reviews…