Flowise allows authenticated users to run any code on the server
What this means
An attacker with a valid login or API key can run commands on the Flowise server and take full control of it. They can steal data, change files, install malware, or use the server to attack other systems. The fix is essential and should be deployed immediately.
SecurityElites Manager Brief: the decision in one minute
Any person with a Flowise login or API key can run code that takes over the server. This is a critical flaw that must be patched now. Update to version 3.1.2 or later.
| SecurityElites Fix-First Score | 51 of 100 Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity. |
|---|---|
| SecurityElites fix window | Within 7 days Critical severity. This is our suggestion from common practice; your own policy comes first. |
| Who should own the fix | Platform or infrastructure team |
| Likely effort | About 15 minutes per server: download and install version 3.1.2 or later, then restart Flowise. Effort could increase if you have multiple servers or if your deployment process is slow. |
Questions to ask your team or supplier
- Are all our Flowise instances updated to version 3.1.2 or later, and can we confirm this in an automated inventory?
- Do we have logs of all requests to `/api/v1/node-custom-function` over the past 30 days, and have we reviewed them for any suspicious activity?
- Should we set a dummy E2B_APIKEY or migrate to an external sandbox service to add a second layer of protection even after patching?
Message you can forward to the owning team
Security notice: Flowise allows authenticated users to run any code on the server (CVE-2026-46442)
Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to flowise 3.1.2 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2026-46442-flowise-allows-authenticated-users-to-run-any-code-on/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01634What is at stake in your AI setup
- Keys for external AI providers: an attacker can steal API keys stored in environment or config files and use them to run expensive operations or steal models
- Chat history and conversation data: an attacker can read and exfiltrate all conversation data and user prompts stored on the server
- Custom functions and node definitions: an attacker can modify or delete workflow definitions, disrupting all AI automation built on this Flowise instance
- Training or retrieval data: if Flowise is connected to a knowledge base or file system, an attacker can read, modify, or delete training data
Who is exposed
- Flowise servers running version 3.1.1 or earlier
- Any setup where employees or contractors have login credentials or API keys
- Deployments where E2B_APIKEY is not configured (the default case)
- Servers connected to databases, file systems, or other critical infrastructure
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| flowise npm | Every version before 3.1.2 | 3.1.2 or later |
Am I affected?
Enter the version you run. Nothing you type is stored.
SecurityElites Developer Brief: the technical picture
| Is it being attacked | Working attack code is public, so expect attacks to follow |
|---|---|
| Where the attacker must be | Anywhere that can reach it over a network, including the internet if it is exposed |
| Account needed | An ordinary user account |
| Does a person have to do something | No. It works without anyone clicking or opening anything |
| How hard it is to do | Easy. It works reliably once the attacker can reach it |
| Risk of: data being read | High |
| Risk of: data or settings being changed | High |
| Risk of: the service being taken down | High |
| Can attackers automate it at scale | No, according to CISA. Each target needs manual work |
| How much control an attacker gains | Total control of the affected software, according to CISA |
Read from the official severity rating: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Kind of coding mistake
- CWE-94: code can be injected
If you cannot upgrade today
- Temporarily disable API key access and require all users to authenticate through the web interface only, so you can monitor login activity more closely
- Restrict network access to Flowise to a whitelist of known IP addresses until you can upgrade
- Set a fake E2B_APIKEY environment variable (any non-empty string) to force Flowise to use an external sandbox instead of NodeVM, which blocks the escape
Signs it may already have been used against you
- Look for POST requests to `/api/v1/node-custom-function` in HTTP access logs, especially with large request bodies or repeated calls
- Check process logs for unexpected child processes spawned by the Flowise service (look for `child_process` or command execution)
- Search for new files created or modified in the Flowise data directory or home folder during the vulnerable window
- Review failed or successful login attempts that do not match your normal user activity patterns
SecurityElites Fix Guide: step by step
- Find where Flowise is runningList all servers or containers where Flowise is deployed. Note the version number of each one. Check your npm package files or container images to confirm the installed version.
- Check if you are affectedIf your Flowise version is 3.1.1 or earlier, you are affected. If E2B_APIKEY is not set in your environment variables, you are affected. Run `echo $E2B_APIKEY` on the server to check.
- Review recent API access logsCheck logs for requests to `POST /api/v1/node-custom-function` from before today. Look for requests from unexpected users, unusual times, or repeated calls. Save these logs in case you need to investigate.
- Upgrade Flowise to version 3.1.2 or laterUpdate the flowise npm package to version 3.1.2 or any later version. For npm projects, run `npm update flowise@3.1.2` or `npm install flowise@^3.1.2`. For container deployments, update your image tag and redeploy.
- Restart FlowiseStop the running Flowise service and start it again. For systemd: `systemctl restart flowise`. For Docker: stop and restart the container.
- Verify the fix is in placeCheck that the running version is 3.1.2 or later. Connect to the server and check the version: check your package.json, container image tag, or the Flowise about page.
- Rotate all API keys and passwordsIf your server was exposed, assume all API keys and authentication tokens may be compromised. Reset them all in the Flowise admin panel and tell all users to log in again.
- Review what happened during exposureCheck server logs, file audit trails, and process history for unusual activity between when the server was first exposed and when you patched it. Look for file changes, new users, or commands run as the Flowise service account.
How to confirm it is fixed: Confirm the running Flowise version is 3.1.2 or later by checking the package version or reading it from the application.
SecurityElites Quick Fixes: copy and paste
Upgrade flowise with npmupgrade
npm install flowise@3.1.2
npm ls flowiseCheck installed Flowise version on npmfor this issue
npm list flowiseCheck if E2B_APIKEY is setfor this issue
echo $E2B_APIKEYSearch logs for the vulnerable endpointfor this issue
grep -i 'node-custom-function' /var/log/flowise/*.logRun the service in a locked-down containergeneral hardening
docker run --read-only --cap-drop ALL \
--security-opt no-new-privileges --user 1000:1000 \
-p 127.0.0.1:8080:8080 YOUR_IMAGETest in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.
Let your AI coding assistant do the upgrade
Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.
Instruction for your coding assistant
You are helping me fix a security vulnerability (CVE-2026-46442) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n - flowise (npm): must be 3.1.2 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.SecurityElites Incident Drill: could your team handle this?
Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.
Ticket for your backlog
Paste into Jira, GitHub Issues or any tracker that reads Markdown.
Ready-made ticket
## Flowise allows authenticated users to run any code on the server (CVE-2026-46442)
**Severity:** Critical | **SE Fix-First Score:** 51/100 | **Fix window:** Within 7 days
**Record:** SE-AIV-01634 https://securityelites.com/ai-vulnerabilities/cve-2026-46442-flowise-allows-authenticated-users-to-run-any-code-on/
### Why this matters
An attacker with a valid login or API key can run commands on the Flowise server and take full control of it. They can steal data, change files, install malware, or use the server to attack other systems. The fix is essential and should be deployed immediately.
### What to do
1. Find where Flowise is running
2. Check if you are affected
3. Review recent API access logs
4. Upgrade Flowise to version 3.1.2 or later
5. Restart Flowise
6. Verify the fix is in place
7. Rotate all API keys and passwords
8. Review what happened during exposure
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-46442-flowise-allows-authenticated-users-to-run-any-code-on/
### Done when
- [ ] flowise is at 3.1.2 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Confirm the running Flowise version is 3.1.2 or later by checking the package version or reading it from the application.
- [ ] Logs were checked for signs of earlier use
SecurityElites Fix Tracker
Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.
Related vulnerabilities
In the same software
- Flowise CSV and Airtable agents allow data theft via prompt injection Critical · CVE-2026-73487
- Flowise can run commands and read files outside its sandbox Critical · CVE-2026-119978
- Flowise OAuth2 token endpoint open to anyone, leaks access tokens Critical · CVE-2026-70478
- Flowise CSV Agent can run Python code sent by attackers Critical · CVE-2026-70477
- Flowise allows authenticated users to change other organizations' billing High · CVE-2026-70476
- Flowise allows any authenticated user to change execution records without permission check High · CVE-2026-70475
The same kind of mistake in other AI tools
- Langflow OSS allows arbitrary code execution through tool listing without admin check High · CVE-2026-128876
- Langflow OSS can run arbitrary code via tool-call interface before admin check High · CVE-2026-128867
- Langflow OSS allows remote code execution through improper code handling High · CVE-2026-127065
- Langflow OSS allows authenticated users to run arbitrary code High · CVE-2026-122088
- Langflow OSS allows authenticated users to run any command on the server High · CVE-2026-120601
Change history
- 14 May 2026: Made public
- 2 Dec 2026: Published
Official record
### Summary`POST /api/v1/node-custom-function` lacks route-level authorization, allowing any authenticated user or API key to submit arbitrary JavaScript to the `Custom JS Function` node.When `E2B_APIKEY` is not configured — the common deployment case — Flowise executes this code inside a `NodeVM` sandbox. This sandbox can be escaped, allowing an attacker to reach the host `process` object and execute system commands via `child_process`.The result is authenticated remote code execution on the Flowise server host. CVSS v3.1: `AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H` = **9.9 Critical**.### DetailsTwo distinct security boundaries are violated.**1. Missing route-level authorization**`packages/server/src/routes/node-custom-functions/index.ts` registers the endpoint with no permission middleware:```ts router.post('/', nodesRouter.executeCustomFunction) ```Other sensitive routes in the same codebase use explicit permission gates:```ts // packages/server/src/routes/chatflows/index.ts router.post( '/', checkAnyPermission('chatflows:create,chatflows:update,agentflows:create,agentflows:update'), chatflowsController.saveChatflow ) ```Global `/api/v1` authentication still applies, so this is not unauthenticated — but any valid session or API key reaches the endpoint without further restriction.**2. NodeVM sandbox escape**The endpoint forwards `body.javascriptFunction` through the following chain:``` POST /api/v1/node-custom-function → packages/server/src/controllers/nodes/index.ts → packages/server/src/utils/executeCustomNodeFunction.ts → packages/components/nodes/utilities/CustomFunction/CustomFunction.ts executeJavaScriptCode(javascriptFunction, sandbox) → packages/components/src/utils.ts if !process.env.E2B_APIKEY → NodeVM fallback → [SINK] host process / child_process ````packages/components/src/utils.ts` only uses the external E2B sandbox when `E2B_APIKEY` is set. Otherwise it silently falls back to `@flowiseai/nodevm`:```ts const shouldUseSandbox = useSandbox && process.env.E2B_APIKEY ```Flowise explicitly frames this as a sandboxed execution path — the helper is named `createCodeExecutionSandbox`, its inline comment reads `Execute JavaScript code using either Sandbox or NodeVM`, and the NodeVM instance is configured with `eval: false`, `wasm: false`, and mocked HTTP clients. The sandbox is a real declared security boundary, not incidental isolation.These controls do not prevent escape. The payload abuses an exception path where an `Error` object escapes the NodeVM boundary. Because the error originates from the host runtime, its constructor chain resolves to the outer Node.js realm. This allows recovery of the host `Function` constructor (`e.constructor.constructor`), which can then access `process` and built-in modules such as `child_process`:```js const FunctionCtor = e.constructor.constructor; const cp = FunctionCtor('return process.getBuiltinModule("child_process")')(); return cp.execSync('id').toString().trim(); ```The NodeVM fallback is the practical default. `packages/server/.env.example` and `CONTRIBUTING.md` do not require `E2B_APIKEY` for custom JS execution, so most deployments are affected.### PoC**Standalone verification** (run from the repository root with `E2B_APIKEY` unset):```js // poc_Flowise_NodeCustomFunction_RCE_2026.js const path = require('path');delete process.env.E2B_APIKEY; process.env.TS_NODE_COMPILER_OPTIONS = JSON.stringify({ moduleResolution: 'NodeNext' });require(path.resolve('targets/Flowise/node_modules/ts-node/register/transpile-only'));const { nodeClass: CustomFunction } = require(path.resolve( 'targets/Flowise/packages/components/nodes/utilities/CustomFunction/CustomFunction.ts' ));const attackCode = ` async function f() { const error = new Error(); error.name = Object.create(null); return error.stack; } return await f().catch(e => { const FunctionCtor = e.constructor.constructor; const cp = FunctionCtor('return
Weakness type: CWE-94
Use this record in your own tools
Get this record as JSON
curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-46442For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker
The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 2 Dec 2026. Read the vendor advisory before changing a production system.