Description
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).
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/multi/http/flowise/mcp_rcemsf undefined(mcp_rce) > show actions ...actions...msf undefined(mcp_rce) > set ACTION < action-name >msf undefined(mcp_rce) > show options ...show and set options...msf undefined(mcp_rce) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub