/

CVE-2026-91931

Severity:

HIGH RISK

(8.5)

OS Command Injection (CWE-78) in Flowise Custom MCP

CVE-2026-91931

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Flowise contains an operating-system command injection vulnerability in the Custom MCP node, where authenticated users can influence package names passed to npx.

An attacker who can access the affected functionality may execute arbitrary code on the Flowise server by causing attacker-controlled npm packages to run.

Affected context

The vulnerability occurs in Flowise deployments that expose the Custom MCP node to authenticated users and process the mcpServerConfig parameter by invoking npx. Risk is higher when users can configure MCP servers or package names without strict allowlisting, validation, isolation, or least-privilege runtime controls.

Exploit preconditions

  • Attack surface: The Flowise Custom MCP node and its MCP server configuration handling
  • Required access: Authenticated access with permission to create or modify a Custom MCP configuration
  • Trigger point: Processing the mcpServerConfig parameter and invoking npx
  • Why exploitation is possible: Attacker-controlled package names reach a command execution pathway, allowing npm packages selected by the attacker to execute on the server

Why this happens

The underlying bug is an OS command injection pattern in which untrusted configuration data is incorporated into a process-launching workflow without sufficiently restricting the executable arguments or package sources.

When attacker-controlled package names are passed to npx, the application effectively permits external package selection and execution. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because input influences an operating-system command or an equivalent process execution operation.

Potential impact

  • An attacker may execute arbitrary code with the privileges of the Flowise process
  • The application and its stored workflows or credentials could be compromised
  • Sensitive data accessible to the server may be disclosed or altered
  • The host could be used for persistence, lateral movement, or further attacks
  • Malicious packages could introduce software supply-chain risk

General mitigation guidance

Mitigation generally focuses on removing attacker control from process execution and reducing trust in externally selected packages.

Common defensive patterns include:

  • Avoiding shell-based command construction and using structured process APIs with fixed executables
  • Enforcing strict allowlists for permitted MCP packages, registries, versions, and invocation modes
  • Validating package identifiers against an explicit schema and rejecting unexpected characters or formats
  • Preventing arbitrary users from defining executable package sources unless that capability is required
  • Running Flowise with least-privilege service accounts, isolated workspaces, and restricted network access
  • Separating package execution from sensitive application services through sandboxing or dedicated workers
  • Avoiding unnecessary credential, filesystem, and host access from MCP execution processes

How teams detect issues like this

Detection approaches can include:

  • Static analysis rules for user-controlled values flowing into exec, spawn, shell commands, or package-manager invocations
  • Code review checks for dynamic construction of npx arguments and unrestricted MCP package configuration
  • Runtime monitoring of child processes launched by Flowise, including unexpected package-manager activity
  • Audit logging for Custom MCP configuration changes, package names, registries, and invoking accounts
  • Policy enforcement that blocks unapproved package sources and outbound package retrieval from production workloads
  • Automated security review tools that identify command injection and unsafe process execution patterns

Sources

SourceLink
github.comgithub.com/FlowiseAI/Flowise/security/advisories/GHSA-vcwp-f9rq-3887
vulncheck.comvulncheck.com/advisories/flowise-before-3.1.4-remote-code-execution-via-custom-mcp-npx

Frequently asked

questions

It may be exploitable over the network when the Flowise instance exposes the Custom MCP functionality and an attacker has valid authenticated access with sufficient configuration permissions.

The attacker generally needs authenticated access that permits creating or modifying a Custom MCP configuration or otherwise controlling the affected mcpServerConfig value.

Do not pass user-controlled package names into unrestricted process execution. Prefer fixed executables, strict package allowlists, structured argument handling, and isolated least-privilege execution.

Treat package and command configuration as untrusted input, enforce authorization and policy controls, monitor child-process activity, and use static analysis and code review to identify unsafe process-launching flows.

Find out what's already
exploitable in your codebase.