Flowise versions from 2.2.7 prior to 3.1.2 are vulnerable to remote code execution through the Custom MCP (Model Context Protocol) node configuration. The vulnerability exists in the /api/v1/node-load-method/customMCP endpoint, which accepts arbitrary command and argument configurations for MCP server initialization. An authenticated attacker can abuse the npx --yes flag to fetch and execute a malicious npm package from an attacker-controlled HTTP server, achieving arbitrary command execution on the Flowise host. This module creates a malicious npm package tar archive in memory, serves it via Metasploit's built-in HTTP server, then triggers the vulnerable endpoint to download and execute the package via npx. To interact with the obtained shell, use the command: sessions -i <id> (for example: sessions -i 1).
Exploit database
Vulnerability
CVE-2026-56274
Flowise - Remote Code Execution via MCP Security Bypass in validateCommandFlags and validateArgsForLocalFileAccess
Vulnerability details
- Score
- 8.7
- Severity
- high
CVSS 4.0 · VulnCheck
Vector string
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NDescription
Flowise before 3.1.2 contains multiple OS command injection vulnerabilities in the Custom MCP Server feature due to incomplete command-flag validation and a regex bypass in local file access restrictions. An attacker with a Flowise account of any role, or API access with view/update permissions for chatflows, can configure a malicious MCP server to bypass the validateCommandFlags blocklist (for example, 'docker build' is not blocked, and 'npx --yes' is not blocked while only '-y' is) and the validateArgsForLocalFileAccess checks, resulting in execution of arbitrary commands on the Flowise host.
CVE ProgramExploit source choices
1 sourceFlowise MCP Server Remote Code Execution
2026-06-23flowise_mcp_rce.rb