Flowise Authenticated Remote Code Execution via MCP Adapter
Flowise versions 3.0.13 and earlier are vulnerable to authenticated arbitrary command execution due to unsafe serialization of stdio commands in the MCP adapter, allowing a malicious user to execute commands on the underlying operating system.
Flowise is an open-source low-code platform to build customized AI flow. Versions 3.0.13 and earlier contain a critical vulnerability that allows authenticated users to execute arbitrary commands on the underlying operating system. This vulnerability stems from insufficient input sanitization within the MCP (Model Composition Protocol) adapter. By adding a new MCP using stdio, an attacker can inject malicious commands, bypassing existing sanitization checks. Specifically, the vulnerability lies in the “Custom MCP” configuration where commands like “npx” can be combined with code execution arguments (e.g., “npx -c touch /tmp/pwn”), leading to direct code execution. This vulnerability affects both the flowise and flowise-components packages.
Attack Chain
- Attacker authenticates to the Flowise application.
- Attacker navigates to the Custom MCP configuration page (e.g.,
/canvas). - Attacker creates a new Custom MCP adapter.
- Attacker configures the MCP adapter to use stdio.
- Attacker injects a malicious command, such as “npx -c touch /tmp/pwn”, into the command or arguments fields. This bypasses
validateCommandInjectionandvalidateArgsForLocalFileAccesschecks. - Flowise application executes the attacker-supplied command via the MCP adapter.
- Malicious command is executed on the underlying operating system.
- Attacker achieves arbitrary code execution on the server.
Impact
Successful exploitation of this vulnerability allows an authenticated attacker to achieve arbitrary command execution on the Flowise server. This could lead to complete system compromise, data theft, or denial of service. The vulnerability affects Flowise installations running versions 3.0.13 and earlier. The number of affected installations is currently unknown, but given the popularity of Flowise, the potential impact is significant.
Recommendation
- Upgrade Flowise and Flowise-components to a version greater than 3.0.13 to patch CVE-2026-40933.
- Monitor process creation events for the execution of “npx” with the “-c” argument where the parent process is the Flowise application. Deploy the provided Sigma rule
Detect Flowise MCP Command Executionto identify potential exploitation attempts. - Implement stricter input validation and sanitization measures within the MCP adapter configuration to prevent command injection attacks.
Detection coverage 3
Detect Flowise MCP Command Execution
criticalDetects command execution via Flowise MCP adapter vulnerability by monitoring for 'npx -c' execution where the parent process is related to Flowise.
Detect Flowise MCP Command Execution (Windows)
criticalDetects command execution via Flowise MCP adapter vulnerability by monitoring for 'npx -c' execution where the parent process is related to Flowise on Windows.
Detect Flowise MCP Command Injection via touch
highDetects command injection via Flowise MCP adapter vulnerability by monitoring for 'touch /tmp/pwn' execution where the parent process is related to Flowise.
Detection queries are kept inside the platform. Get full rules →