Flowise can run untrusted code and read files outside its sandbox

CriticalSE Fix-First Score 51/100CVE-2026-69253SE-AIV-01683Reading or writing files it should notAI apps and chat interfacesMade public 4 Aug 2026

Download as PDF

What this means

An attacker who can add custom JavaScript code to a Flowise workflow can read or write any file on the server, steal credentials, or run commands. This breaks the safety promise of the sandbox and puts all data on that server at risk.

SecurityElites Manager Brief: the decision in one minute

The sandbox that Flowise uses to run custom code is broken and can be escaped. Someone with access to add code to a workflow can steal files, secrets, and data from the entire server. You must upgrade both flowise and flowise-components to 3.1.3 immediately and audit any custom workflows for signs of attack.

SecurityElites Fix-First Score51 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 7 days
Critical severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixPlatform engineering or DevOps team (whoever manages Flowise deployments).
Likely effortAbout 15 minutes per Flowise installation: upgrade the npm packages and restart the service. Longer if you need to audit custom workflows first or coordinate across multiple deployments.

Questions to ask your team or supplier

  • Do we have any Flowise instances running custom JavaScript code from external users or dynamically generated workflows? If so, have we confirmed they are still on version 3.1.1 or earlier?
  • What data is stored on the same servers as Flowise, and what would happen if an attacker could read or write those files?
  • After we upgrade, how will we audit workflows to make sure no malicious custom code was added before the patch?

Message you can forward to the owning team

Security notice: Flowise can run untrusted code and read files outside its sandbox (CVE-2026-69253)

Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to flowise 3.1.3, flowise-components 3.1.3 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-69253-flowise-can-run-untrusted-code-and-read-files-outside/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01683

What is at stake in your AI setup

  • Keys and credentials for AI providers: an attacker can steal API keys stored in Flowise configuration or environment variables
  • Custom prompts and system messages: an attacker can read or modify prompts used by agents
  • Retrieval or training data: an attacker can access files used for vector stores, documents, or model training
  • Chat history and user data: an attacker can read conversation logs and user information stored on the server

Map where your company uses AI

Who is exposed

  • Any team that has set up Flowise for end users or customers to build workflows
  • Teams running Flowise with custom functions or tools that accept user-supplied code
  • Flowise instances on the same network or server as other sensitive systems
  • Setups where the Flowise process runs with broad file or network permissions

Upgrades you need

SoftwareAffected versionsMove to
flowise
npm
Every version before 3.1.33.1.3 or later
flowise-components
npm
Every version before 3.1.33.1.3 or later

Am I affected?

Enter the version you run. Nothing you type is stored.

SecurityElites Developer Brief: the technical picture

Is it being attackedNo known attacks and no public attack code when CISA last reviewed it
Where the attacker must beAnywhere that can reach it over a network, including the internet if it is exposed
Account neededAn ordinary user account
Does a person have to do somethingNo. It works without anyone clicking or opening anything
How hard it is to doHard. It depends on conditions the attacker does not control
Risk of: data being readHigh
Risk of: data or settings being changedHigh
Risk of: the service being taken downHigh
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsTotal control of the affected software, according to CISA

Read from the official severity rating: CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Kind of coding mistake

  • CWE-95: code can be injected through evaluation

If you cannot upgrade today

  • Until the upgrade is done, disable or remove all custom JavaScript code, custom functions, and custom tools from Flowise workflows
  • If custom code must run, temporarily move it to a separate, isolated service or container with restricted permissions and no access to sensitive files
  • Restrict who can add or edit custom workflows to only trusted administrators

Signs it may already have been used against you

  • File access logs: look for the Flowise process reading or writing files outside its own directory
  • System call logs or audit logs: look for unusual commands or shell invocations from the Node.js Flowise process
  • Flowise application logs: look for errors or unusual behavior during custom function or tool execution
  • Network logs: look for unexpected outbound connections from the Flowise server to external systems, especially credential theft attempts

Log searches to start from

Flowise process accessing files outside its directory (adapt field names to your logs)Splunk

process=flowise OR process=node | search file_path NOT LIKE "%flowise%" | stats count by file_path, action

Unusual child processes spawned from Flowise Node.js (adapt field names to your logs)Elastic

process.parent.name:node AND process.parent.args:flowise AND process.name:* | stats count by process.name, process.command_line

Written with AI as a starting point. Review them and change the index and field names to match your own logs before you rely on the result.

SecurityElites Fix Guide: step by step

  1. Find where Flowise and flowise-components are installedLook for flowise and flowise-components in your npm packages. Check package.json files in your project, and run npm list flowise flowise-components if you use npm globally or in a project.
  2. Check the current versionRun npm list flowise or npm list flowise-components in the directory where it is installed. Write down both version numbers. If either one is before 3.1.3, it is vulnerable.
  3. Review custom workflows for untrusted code sourcesList or export any custom JavaScript functions, tools, or workflows in Flowise. Note which ones come from external sources, users, or are dynamically generated. These are the highest risk.
  4. Upgrade flowise to version 3.1.3 or laterRun the upgrade command provided by your platform team. This will update the flowise npm package to 3.1.3 or later.
  5. Upgrade flowise-components to version 3.1.3 or laterRun the upgrade command provided by your platform team. This will update the flowise-components npm package to 3.1.3 or later.
  6. Restart the Flowise serviceStop and start the Flowise process, or restart the container or server it runs on. Wait for it to come back online and confirm it is responding.
  7. Confirm the upgrade workedRun npm list flowise and npm list flowise-components again. Both should show version 3.1.3 or later.
  8. Check logs for signs of exploitation before the upgradeReview Flowise logs and system logs from before today for unusual file reads, writes, or commands. Look for access to files outside the Flowise data directory, or execution of system commands from JavaScript code.

How to confirm it is fixed: Run npm list flowise and npm list flowise-components and confirm both show version 3.1.3 or later.

SecurityElites Quick Fixes: copy and paste

Upgrade flowise with npmupgrade

npm install flowise@3.1.3
npm ls flowise

Upgrade flowise-components with npmupgrade

npm install flowise-components@3.1.3
npm ls flowise-components

Check installed version of flowisefor this issue

npm list flowise

Check installed version of flowise-componentsfor this issue

npm list flowise-components

Keep file access inside one directory (Python)general hardening

from pathlib import Path

BASE = Path("/srv/app/data").resolve()

def safe_path(name: str) -> Path:
    p = (BASE / name).resolve()
    if not p.is_relative_to(BASE):
        raise ValueError("path outside allowed directory")
    return p

Test 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-69253) 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.3 or later
   - flowise-components (npm): must be 3.1.3 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.

What is the vulnerable component in Flowise, and why does patching the sandbox library alone not fix it?A good answer: Flowise itself allows untrusted code to escape the vm2 sandbox; the sandbox library version is not the root cause. The fix requires Flowise code changes to prevent the escape.
Which two npm packages need to be upgraded to fix this, and what is the minimum safe version for each?A good answer: Both flowise and flowise-components must be upgraded to version 3.1.3 or later.
What type of Flowise feature is most dangerous with this vulnerability, and why?A good answer: Custom functions, custom tools, and user-supplied JavaScript workflows are most dangerous because an attacker can inject or modify code that then escapes the sandbox.
If you cannot upgrade Flowise immediately, what is the best temporary measure?A good answer: Disable all custom JavaScript code, functions, and tools, and restrict who can add or edit workflows to trusted administrators only.

Run a full timed drill with your team

Ticket for your backlog

Paste into Jira, GitHub Issues or any tracker that reads Markdown.

Ready-made ticket

## Flowise can run untrusted code and read files outside its sandbox (CVE-2026-69253)

**Severity:** Critical  |  **SE Fix-First Score:** 51/100  |  **Fix window:** Within 7 days
**Record:** SE-AIV-01683 https://securityelites.com/ai-vulnerabilities/cve-2026-69253-flowise-can-run-untrusted-code-and-read-files-outside/

### Why this matters
An attacker who can add custom JavaScript code to a Flowise workflow can read or write any file on the server, steal credentials, or run commands. This breaks the safety promise of the sandbox and puts all data on that server at risk.

### What to do
1. Find where Flowise and flowise-components are installed
2. Check the current version
3. Review custom workflows for untrusted code sources
4. Upgrade flowise to version 3.1.3 or later
5. Upgrade flowise-components to version 3.1.3 or later
6. Restart the Flowise service
7. Confirm the upgrade worked
8. Check logs for signs of exploitation before the upgrade

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-69253-flowise-can-run-untrusted-code-and-read-files-outside/

### Done when
- [ ] flowise is at 3.1.3 or later everywhere it is installed
- [ ] flowise-components is at 3.1.3 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Run npm list flowise and npm list flowise-components and confirm both show version 3.1.3 or later.
- [ ] 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.

Sign in to track this fix

Change history

  • 4 Aug 2026: Made public
  • 2 Dec 2026: Published

Official record

============================================================================= Security Advisory elttamTopic: Flowise JavaScript Sandbox EscapeModule: FlowiseAI/Flowise, FlowiseAI/nodevm Disclosed: 11-Apr-2026 Credits: Luke Jahnke and Alex Brown Affects: `FlowiseAI/Flowise 3.1.1`, `FlowiseAI/nodevm 3.9.25`# I. BackgroundFlowise AI is an open-source, low-code platform for building AI applications—such as chatbots, workflows, and autonomous agents—through an intuitive drag-and-drop interface, minimising the need for extensive coding.The platform also enables execution of custom JavaScript within a sandboxed environment via the Custom Function Agent Flow node or Custom Tool. By default, this sandbox is powered by `patriksimek/vm2`, a fork of the `patriksimek/vm2` package.# II. Problem Description**NOTE**: This vulnerability still impacts commit `dddfb3c90eec900d747790a439bd362a764039cd` (the latest commit on the main branch at the time of writing). The original report was incorrectly closed, due to a misunderstanding that the report was about the use of an outdated and vulnerable version of the `patriksimek/vm2` sandbox. The sandbox escape that this report documents is an issue with Flowise, and patching the `vm2` sandbox would not resolve it.The `patriksimek/vm2` sandbox executes JavaScript within the same Node.js process, which introduces significant security limitations and makes safely isolating untrusted code inherently difficult. Due to these concerns, the maintainers had deprecated the project and previously issued the following warning:*https://github.com/n8n-io/vm2* > The library contains critical security issues and should not be used in production. Maintenance has been discontinued. Consider migrating to `isolated-vm`.To demonstrate the risks associated with the use of the `vm2` sandbox, a sandbox escape specific to Flowise was investigated. The code snippet below shows the allowed modules that could be used within custom JavaScript code on Flowise.https://github.com/FlowiseAI/Flowise/blob/flowise%403.1.1/packages/components/src/utils.ts#L124 ```ts const defaultAllowExternalDependencies = ['axios', 'moment', 'node-fetch'] <1> ``` <1> Allows custom JavaScript code to use the `axios`, `moment` and `node-fetch` dependencies.Notably, the `moment` dependency had a previously reported path traversal vulnerability (`CVE-2022-24785`) that could lead to RCE when user input is passed to the `locale` function. The patch for `CVE-2022-24785` was implementing regex check to disallow `/` or `\` characters within a locale name, as shown in the code snippet below.*Patch for `CVE-2022-24785` in `moment` (https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5)* ```js function isLocaleNameSane(name) { // Prevent names that look like filesystem paths, i.e contain '/' or '\' return name.match('^[^/\\\\]*$') != null; <1> }function loadLocale(name) { var oldLocale = null, aliasedRequire; // TODO: Find a better way to register and load all the locales in Node if ( locales[name] === undefined && typeof module !== 'undefined' && module && module.exports && isLocaleNameSane(name) <1> ) { try { oldLocale = globalLocale._abbr; aliasedRequire = require; aliasedRequire('./locale/' + name); <2> getSetGlobalLocale(oldLocale); } catch (e) { // mark as not found to avoid repeating expensive file require call causing high CPU // when trying to find en-US, en_US, en-us for every format call locales[name] = null; // null means not found } } return locales[name]; } ``` <1> Performs a regex check to disallow `/` or `\` characters within the provided loca

Weakness type: CWE-95

Use this record in your own tools

Get this record as JSON

curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-69253

For 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.