llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · flowise

GHSA-VCWP-F9RQ-3887

Flowise Custom MCP npx package execution leads to authenticated server-side command execution

Parche disponible
Descargar PNG JSON
CVSS 4.0
9.0
Crítica
CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -33 d de la divulgación
Exposición80 dDesde la divulgación, 31 ago 2026, 9:01 a. m.
Detección79 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 3.1.4
Monitoreo
Detectada +1
29 jul 26
31 ago 26
18 nov 26
19 nov 26
29 jul 26
26 ago 26
24 sept 26
22 oct 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 3.1.4 flowise · -33 d desde divulgación
Divulgación Publicada GHSA-VCWP-F9RQ-3887 divulgada · CVSS 9 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Flowise Authenticated Command Execution via Custom MCP `npx`

Summary

Flowise is an open-source visual platform for building LLM applications, chatflows, agents, and tool integrations. Flowise includes a Custom MCP node that lets users configure Model Context Protocol servers. In Flowise 3.1.2, the Custom MCP stdio configuration allows the command `npx` and only blocks a limited set of dangerous flags. Because `npx` can install and run arbitrary npm package binaries, an authenticated attacker can execute code on the Flowise server without using shell metacharacters, `node -e`, or `python -c`.

The issue was validated against the official Docker image running Flowise 3.1.2. A safe proof of concept used `npx shx touch <marker>` through the Custom MCP node load method. Flowise returned a normal "No Available Actions" response because `shx` is not an MCP server, but the marker file was created inside the container before MCP initialization failed.

Technical Details

Root Cause

The Custom MCP implementation parses user-supplied MCP server configuration and initializes an MCP toolkit. When the config contains a `command`, Flowise uses stdio transport and spawns the configured command.

Relevant flow:

  1. `POST /api/v1/node-load-method/customMCP`
  2. `nodesService.getSingleNodeAsyncOptions()`
  3. `Custom_MCP.loadMethods.listActions()`
  4. `Custom_MCP.getTools()`
  5. `validateMCPServerConfig(serverParams)`
  6. `new MCPToolkit(serverParams, 'stdio')`
  7. `StdioClientTransport` starts the configured process

In `packages/components/nodes/tools/MCP/core.ts`, Flowise allowlists several commands:

const allowedCommands = ['node', 'npx', 'python', 'python3', 'docker']

It also blocks obvious dangerous flags:

npx: [
    '-c',
    '--call',
    '--shell-auto-fallback',
    '-y',
    '--yes',
    '--node-options'
]

These checks block direct payloads such as `node -e`, `python3 -c`, and `npx -c`. However, allowing `npx` still allows arbitrary npm package binaries to execute. The validation does not restrict package names, npm package sources, or package-provided binaries.

Why This Bypasses the Intended Allowlist

The payload does not rely on shell command injection. It does not use `;`, `&&`, `$()`, backticks, `node -e`, or `python -c`. Instead, it uses the intended behavior of `npx`:

npx shx touch flowise_mcp_report_130e4352

`shx` is an npm package that exposes shell-like utilities through Node.js. The specific proof of concept used the `touch` command to create a harmless marker file. An attacker could instead use an attacker-controlled npm package with a binary that executes arbitrary JavaScript during execution.

Proof of Concept

Prerequisites
  • A valid authenticated Flowise session.
  • Access to the Custom MCP node load method or the ability to configure Custom MCP.
  • Network access to the Flowise HTTP API.
Request
POST /api/v1/node-load-method/customMCP HTTP/1.1
Host: localhost:3000
Content-Type: application/json
X-Request-From: internal
Cookie: <authenticated Flowise session>

{
  "loadMethod": "listActions",
  "inputs": {
    "mcpServerConfig": "{\"command\":\"npx\",\"args\":[\"shx\",\"touch\",\"flowise_mcp_report_130e4352\"]}"
  }
}
Observed Response

Flowise returns an MCP action discovery error because `shx` is not an MCP server:

[
  {
    "label": "No Available Actions",
    "name": "error",
    "description": "No available actions, please check your API key and refresh"
  }
]

The error does not prevent exploitation. The process is already spawned before Flowise determines that it is not a valid MCP server.

Confirmed Side Effect

The marker file was created inside the Flowise container:

/flowise_mcp_report_130e4352

Evidence screenshot is available on request.

Impact

A successful attacker can execute commands as the Flowise process inside the container. Practical impact includes:

  • Reading Flowise configuration, local files, and environment variables accessible to the process.
  • Accessing credentials stored on disk or exposed through the runtime environment.
  • Modifying Flowise data and application files accessible to the process.
  • Running network tools from the container to pivot to internal services reachable from the Flowise deployment.
  • Denial of service by consuming resources, deleting accessible files, or terminating processes.

The impact may be higher in deployments where the Flowise container has broad filesystem mounts, cloud credentials, access to internal networks, or elevated Docker privileges.

Remediation

Recommended fixes:

  1. Remove `npx` from the Custom MCP stdio command allowlist.
  2. Do not permit runtime package installation or package execution from user-supplied MCP configuration.
  3. If stdio MCP is required, allow only administrator-installed MCP server binaries by absolute path.
  4. Add a strict package or binary allowlist maintained by administrators, not users.
  5. Require route-level authorization for `/api/v1/node-load-method/customMCP` and all Custom MCP configuration paths.
  6. Disable Custom MCP stdio execution for untrusted users.
  7. Run MCP subprocesses in a sandbox with no secrets, a read-only filesystem, restricted network access, and resource limits.
  8. Log and alert on every Custom MCP stdio process launch.

Suggested Patch Direction

At minimum, the allowlist should remove `npx`:

const allowedCommands = ['node', 'python', 'python3', 'docker']

A safer approach is to remove all generic interpreters and package managers from user-controlled stdio MCP configs and allow only explicit administrator-managed MCP server binaries:

const allowedCommands = process.env.FLOWISE_ALLOWED_MCP_BINARIES?.split(',') ?? []

The allowed entries should be absolute paths to trusted binaries, and arguments should be validated per binary.

Validation Notes

The following related paths were tested and did not produce command execution in this validation:

  • Custom Function vm2 escape attempts.
  • Direct `node -e` in Custom MCP.
  • Direct `python3 -c` in Custom MCP.
  • Dangerous Docker subcommands and flags.

The confirmed issue is specifically that `npx` package binary execution is allowed by the Custom MCP validator.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:H
AltoBajoNinguno
Integridad (sistema)VI:H
AltoBajoNinguno
Disponib. (sistema)VA:H
AltoBajoNinguno
Confid. (posterior)SC:H
AltoBajoNinguno
Integridad (posterior)SI:H
AltoBajoNinguno
Disponib. (posterior)SA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
flowise · flowise-components≤ 3.1.3
3.1.3
3.1.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmflowise
Corregida 3.1.4 -33 d 3.1.4 no afectada
npmflowise-components
Corregida 3.1.4 -33 d 3.1.4 no afectada
Versiones corregidas3.1.4
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/FlowiseAI/Flowise/security/advisories/GHSA-vcwp-f9rq-3887

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.