Flowise Remote Code Execution via Sandbox Escape
Authenticated users can achieve remote code execution in Flowise by exploiting an insecure object merge in the executeJavaScriptCode function to override sandbox restrictions.
CVE search metadata
CVE search record: CVE-2026-70477. KEV: no. Product: Flowise, Flowise (<= 3.1.2), flowise-components (<= 3.1.2). Brief: Flowise Remote Code Execution via Sandbox Escape. Brief link: https://feed.craftedsignal.io/briefs/2026-08-04-flowise-rce/
Triage facts
Revision 2- Applicability
- Flowise, Flowise (<= 3.1.2) +1
- Evidence
- Unknown
- Severity
- High
- Action
- Elevated
- Sources
- 2 public sources
- Freshness
- Revision 2Aug 4, 17:24 UTC
- Vulnerabilities
- 1 CVE
- Source quality
- A1Very likely
Revision history 1 entry · Revision 2
- Revision 2
Repaired a legacy canonical identity collision
Changed: slug
Flowise is susceptible to a high-severity sandbox escape vulnerability that allows unauthenticated or authenticated users (depending on deployment configuration) to execute arbitrary code with the privileges of the Flowise process. The vulnerability exists within the executeJavaScriptCode() utility, which employs an insecure merge strategy when initializing the NodeVM sandbox. Specifically, the application uses the JavaScript spread operator ({ ...defaultNodeVMOptions, ...nodeVMOptions }) to combine default security settings with user-supplied options. Because the user-supplied options are applied last, an attacker can override the restricted require.builtin allowlist, re-enabling access to powerful Node.js modules such as child_process and fs. By bypassing the module restrictions, an attacker can instantiate a nested VM or directly interact with the host filesystem and OS, leading to full system compromise.
Attack Chain
- Attacker authenticates to the Flowise API to obtain a valid Bearer token.
- Attacker interacts with the
/api/v1/node-custom-functionendpoint. - Attacker submits a payload containing a malicious
javascriptFunctionstring. - The Flowise backend controller passes the user-supplied JavaScript code into the
executeCustomNodeFunctionservice. - The application invokes
executeJavaScriptCode(), which initializes a NodeVM instance. - The attacker uses an absolute path to require internal Flowise utility modules, bypassing existing module resolution restrictions.
- The attacker calls
executeJavaScriptCode()again from within the sandbox, providing a maliciousnodeVMOptionsobject. - The
finalNodeVMOptionsobject is constructed, overriding the default sandbox security constraints with{ require: { builtin: ["*"] } }. - The attacker executes arbitrary OS commands via the
child_processmodule, gaining RCE on the server.
Impact
Successful exploitation results in full remote code execution on the server hosting the Flowise instance. If the Flowise application is running with root or elevated service account privileges, the attacker gains complete control over the host environment. This allows for data exfiltration, lateral movement within the network, and the deployment of persistent threats. All Flowise instances utilizing executeJavaScriptCode() are affected.
Recommendation
- Update Flowise to the latest patched version provided by FlowiseAI that remediates the insecure object spread in
executeJavaScriptCode(). - Implement strict network egress filtering for the container or server running Flowise to prevent the execution of malicious payloads that require outbound C2 communication.
- Review and restrict access to the
/api/v1/node-custom-functionendpoint using an identity-aware proxy or firewall, ensuring only trusted administrative users can access this functionality. - Run the Flowise service with a non-privileged, dedicated service account to limit the impact of potential RCE vulnerabilities.
Immediate actions
Patch Flowise instance to version containing fix for GHSA-3769-jgqc-cxm7
Mitigations
Restrict access to /api/v1/node-custom-function
Sandbox escape and unauthorized function execution