CVE-2025-59528: Flowise has Remote Code Execution vulnerability
Flowise 3.0.5 passes the CustomMCP node's mcpServerConfig string to the Function() constructor, so anyone who can call /api/v1/node-load-method/customMCP can run JavaScript on the server. That means command execution and file access. The advisory scores it 10.0. The package data lists 3.0.6 as the patched version.
Published Sep 15, 2025 · Updated Sep 22, 2025 · Analysis Nov 9, 2026
What an attacker can do
The CustomMCP node lets users enter the configuration for an external MCP server as text. The request reaches the node through POST /api/v1/node-load-method/customMCP with an mcpServerConfig input. The function convertToValidJSONString in CustomMCP.ts then evaluates the string with Function('return ' + inputString)(). Variable substitution for $vars templates happens first and applies no filtering.
Code evaluated this way runs in the Node.js context with access to child_process and fs. The reporter's proof of concept sends a JSON body whose mcpServerConfig holds an immediately-invoked function that calls execSync and writes /tmp/RCE.txt. The request carries only an Authorization bearer API token, with no admin session or user interaction. The CVSS vector shows no privileges required and a changed scope, which gives the 10.0.
An attacker with any valid API token for the instance, or an instance that is open without auth, gets full control of the host: shell commands, files, environment secrets and data from every connected flow. The EPSS score for this advisory is very high (about 0.86), which points to strong attacker interest. No source we read confirms exploitation.
Who is affected
The flowise npm package at 3.0.5, per the package data. Any instance that exposes the Flowise API to users or networks you do not fully trust is in scope. Check the version:
npm ls flowiseFor Docker, check the image tag. Look at who holds API keys for the instance, and whether the Flowise port is open to the internet.
flowise
- Ecosystem
- npm
- Affected
- = 3.0.5
- Fixed in
- 3.0.6
- Check
npm ls flowise
How to fix it
Upgrade to flowise 3.0.6 or newer:
npm install -g flowise@latestThe package data names 3.0.6 as the patched version. The 3.0.6 release notes do not describe this fix; they list other security changes such as secured password reset endpoints and a chatId path traversal check. The sources give no workaround. Until you upgrade, keep Flowise off the public internet, restrict who holds API keys, and rotate all keys and secrets the server process can read if the instance was reachable.
How to tell if you were hit
Search web server and application logs for POST requests to /api/v1/node-load-method/customMCP, and read the body for mcpServerConfig values that contain process.mainModule, require, child_process, execSync or fs calls. On the host, look for child processes of the Flowise node process, unexpected files such as /tmp/RCE.txt, and outbound connections to unfamiliar hosts. Review which API tokens made the calls.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Description
Cause of the Vulnerability
The CustomMCP node allows users to input configuration settings for connecting to an external MCP (Model Context Protocol) server. This node parses the user-provided mcpServerConfig string to build the MCP server configuration. However, during this process, it executes JavaScript code without any security validation.
Specifically, inside the convertToValidJSONString function, user input is directly passed to the Function() constructor, which evaluates and executes the input as JavaScript code. Since this runs with full Node.js runtime privileges, it can access dangerous modules such as child_process and fs.
Vulnerability Flow
- User Input Received: Input is provided via the API endpoint
/api/v1/node-load-method/customMCPthrough themcpServerConfigparameter. - Variable Substitution: The
substituteVariablesInStringfunction replaces template variables like$vars.xxx, but no security filtering is applied during this step. - Dangerous Code Execution: The
convertToValidJSONStringfunction executes the input usingFunction('return ' + inputString)(). If theinputStringcontains malicious code, it gets executed in the global Node.js context, allowing actions such as command execution and file system access.
Taint Flow
- Taint 01: Route Registration `index.ts` (Line 5)
- Taint 02: Controller `index.ts` (Line 57–78)
- Taint 03: Service `index.ts` (Line 91–94)
- Taint 04: CustomMCP Node Entry Point `CustomMCP.ts` (Line 132)
- Taint 05: Variable Substitution `CustomMCP.ts` (Line 220)
- Taint 06: Dangerous Constructor Execution `CustomMCP.ts` (Line 262–270)
Proof of Concept (PoC)
curl -X POST http://localhost:3000/api/v1/node-load-method/customMCP \
-H "Content-Type: application/json" \
-H "Authorization: Bearer tmY1fIjgqZ6-nWUuZ9G7VzDtlsOiSZlDZjFSxZrDd0Q" \
-d '{
"loadMethod": "listActions",
"inputs": {
"mcpServerConfig": "({x:(function(){const cp = process.mainModule.require(\"child_process\");cp.execSync(\"echo !!RCE-OK!! >/tmp/RCE.txt\");return 1;})()})"
}
}'When executed, this creates a file /tmp/RCE.txt on the server, confirming command execution.
Impact
Complete System Takeover and Infrastructure Threat
This vulnerability allows attackers to execute arbitrary JavaScript code on the Flowise server, leading to:
- Full system compromise
- File system access
- Command execution
- Sensitive data exfiltration
As only an API token is required, this poses an extreme security risk to business continuity and customer data.
Credited to im-soohyun.
Questions
- Does CVE-2025-59528 need a login?
The proof of concept uses a bearer API token. The advisory says only an API token is required, so any holder of a valid key can attack the instance.
- Which Flowise version is fixed?
3.0.6, per the package data. The release notes of 3.0.6 do not mention the CustomMCP change, so confirm the code after upgrading.
- Is it exploited in the wild?
It is not in CISA's KEV catalog and no source we read reports attacks, but the EPSS score is very high and a working proof of concept is public.
- What does the attacker get?
Arbitrary JavaScript in the server's Node.js context, which gives command execution, file access and any secret the process can read.
References
Read for this analysis:
- https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-3gcm-f6qx-ff7p
- https://github.com/FlowiseAI/Flowise/releases/tag/flowise%403.0.6
- https://github.com/FlowiseAI/Flowise/blob/5930f1119c655bcf8d2200ae827a1f5b9fec81d0/packages/components/nodes/tools/MCP/CustomMCP/CustomMCP.ts#L132
- https://github.com/FlowiseAI/Flowise/blob/5930f1119c655bcf8d2200ae827a1f5b9fec81d0/packages/components/nodes/tools/MCP/CustomMCP/CustomMCP.ts#L220
- https://github.com/FlowiseAI/Flowise/blob/5930f1119c655bcf8d2200ae827a1f5b9fec81d0/packages/components/nodes/tools/MCP/CustomMCP/CustomMCP.ts#L262-L270
- https://github.com/FlowiseAI/Flowise/blob/5930f1119c655bcf8d2200ae827a1f5b9fec81d0/packages/server/src/controllers/nodes/index.ts#L57-L78
- https://github.com/FlowiseAI/Flowise/blob/5930f1119c655bcf8d2200ae827a1f5b9fec81d0/packages/server/src/routes/node-load-methods/index.ts#L5
- https://github.com/FlowiseAI/Flowise/blob/5930f1119c655bcf8d2200ae827a1f5b9fec81d0/packages/server/src/services/nodes/index.ts#L91-L94
- https://nvd.nist.gov/vuln/detail/CVE-2025-59528
- https://github.com/advisories/GHSA-3gcm-f6qx-ff7p
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Flowise vulnerabilities
All Flowise entriesCVE-2026-73483
Flowise NodeVM sandbox escape via puppeteer allowlist - authenticated RCE and arbitrary file read via Chromium
critical9.4Oct 7, 2026CVE-2026-73487
Flowise Prompt Injection to RCE and SSRF via CSV/Airtable Agent Python Validator Bypass
critical9.0Oct 7, 2026CVE-2026-69250
Flowise: Unauthenticated OAuth2 Refresh Enables Non-Blind SSRF and Secret Exfiltration
high8.5Aug 4, 2026CVE-2026-69251
Flowise RCE via TypeORM DataSource
critical9.0Aug 4, 2026CVE-2026-69252
Flowise: Missing authorization on `/api/v1/files` allows low-privileged API keys to list and delete files across workspaces within the same organization
high7.2Aug 4, 2026CVE-2026-69253
Flowise Sandbox Escape to RCE
critical9.0Aug 4, 2026
