Flowise CSV Agent can run Python code sent by attackers
What this means
An attacker can send a crafted message to a Flowise chatflow that uses the CSV Agent node. The system will generate and run Python code that the attacker controls, letting them read files, steal data, install malware, or take over the server. This happens without requiring a login.
SecurityElites Manager Brief: the decision in one minute
Flowise CSV Agent nodes accept Python code generated from user messages without sufficient security checks. Attackers can craft messages that bypass the safety rules and run arbitrary code on the server. Upgrade flowise and flowise-components to version 3.1.3 immediately.
| 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 engineering or DevOps team managing Flowise deployments. |
| Likely effort | About 15 minutes per server: an npm package upgrade and a restart of the Flowise service. Longer if you need to test with your own chatflows first or if you have many Flowise instances to update. |
Questions to ask your team or supplier
- Do we have a list of all Flowise instances and which chatflows use the CSV Agent node? Have we tested the upgrade on a staging instance first?
- Who has access to our Flowise chatflows? Should we restrict them to internal users only while we roll out the fix?
- Do our Flowise servers have access to sensitive files, keys, or systems? Should we isolate them or reduce their permissions until the upgrade is complete?
Message you can forward to the owning team
Security notice: Flowise CSV Agent can run Python code sent by attackers (CVE-2026-70477)
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-70477-flowise-csv-agent-can-run-python-code-sent-by/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01607What is at stake in your AI setup
- LLM model weights and configuration: an attacker can read or modify model files stored on disk.
- Prompts and chat history: Python execution on the server can read any conversation data or prompt templates stored in Flowise memory or databases.
- API keys and credentials: an attacker can extract keys for connected AI providers, databases, or other services that the Flowise process has access to.
- Connected tools and systems: a CSV Agent node can be a stepping stone to attack databases, APIs, or internal systems that the agent is authorized to reach.
Who is exposed
- Any Flowise chatflow that uses a CSV Agent node and is accessible to end users or the internet.
- Teams running Flowise versions before 3.1.3.
- Systems where Flowise runs with the same access as sensitive files or keys.
- Chatflows that connect CSV Agent to critical databases or systems.
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| flowise npm | Every version before 3.1.3 | 3.1.3 or later |
| flowise-components npm | Every version before 3.1.3 | 3.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 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 | None. No login is needed |
| Does a person have to do something | No. It works without anyone clicking or opening anything |
| How hard it is to do | Hard. It depends on conditions the attacker does not control |
| 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 | Yes, according to CISA |
| 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:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Kind of coding mistake
- CWE-94: code can be injected
Where it sits in the standards
OWASP Top 10 for LLM Applications 2025: LLM01 Prompt Injection
If you cannot upgrade today
- Until you can upgrade, disable or remove all CSV Agent nodes from production chatflows. Replace them with a safer agent type or use a CSV parser that does not execute Python.
- If you must keep CSV Agent nodes, restrict access to those chatflows to trusted internal users only. Remove public URLs and authentication mechanisms if any exist.
- Isolate the Flowise server in a network segment with minimal access to sensitive files, databases, or systems. Run it with the minimum file system and OS permissions needed.
Signs it may already have been used against you
- In Flowise server logs or application monitoring, look for Python code execution events, traceback messages, or errors from the pyodide environment that do not match normal CSV Agent use.
- Search for chatflow messages containing unusual Python syntax, obfuscated string patterns like chr() calls, or references to exec, __getattribute__, or frame objects before the attack date.
- Check for unexpected file access, process creation, or network connections initiated by the Flowise process around the time of suspected attacks.
- Review CSV Agent node outputs or intermediate logs for Python code that includes string concatenation, encoding tricks, or decorators used to hide dangerous commands.
SecurityElites Fix Guide: step by step
- Find where Flowise is installedList the packages installed in your Node.js projects or container images. Look for flowise or flowise-components in the package.json file or npm list output. Note the version number and the full path to each installation.
- Check the current versionRun npm list flowise and npm list flowise-components in the directory where Flowise is installed. Write down the version number for each.
- Back up your Flowise data and configurationIf Flowise stores data in a database or configuration files, make a full copy to a safe location. This protects you in case the upgrade causes unexpected issues.
- Upgrade both packages to version 3.1.3 or laterIn the directory where Flowise is installed, run npm install flowise@3.1.3 and npm install flowise-components@3.1.3. Wait for the installation to complete without errors.
- Restart the Flowise serviceStop the running Flowise process and start it again. For systemd, run systemctl restart flowise. For Docker, stop and restart the container. Wait for the service to report that it is ready.
- Verify the upgrade was successfulRun npm list flowise and npm list flowise-components again and confirm both show version 3.1.3 or higher. Check the Flowise UI or API endpoint to confirm the service is running and accepting requests.
- Review logs for signs of past attacksCheck the Flowise server logs, error logs, and any application monitoring for unusual Python execution, failed code validation, or unexpected chatflow messages sent before the upgrade.
- Review and test your CSV Agent chatflowsTest each chatflow that uses a CSV Agent node with normal user queries to confirm it still works. If you have honeypot or test queries saved, run them again to ensure the safety checks are now in place.
How to confirm it is fixed: Confirm that both flowise and flowise-components packages are version 3.1.3 or later by running npm list flowise flowise-components and that the Flowise service has restarted successfully.
SecurityElites Quick Fixes: copy and paste
Upgrade flowise with npmupgrade
npm install flowise@3.1.3
npm ls flowiseUpgrade flowise-components with npmupgrade
npm install flowise-components@3.1.3
npm ls flowise-componentsCheck installed Flowise package versionfor this issue
npm list flowise flowise-componentsTest 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-70477) 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.
Ticket for your backlog
Paste into Jira, GitHub Issues or any tracker that reads Markdown.
Ready-made ticket
## Flowise CSV Agent can run Python code sent by attackers (CVE-2026-70477)
**Severity:** Critical | **SE Fix-First Score:** 51/100 | **Fix window:** Within 7 days
**Record:** SE-AIV-01607 https://securityelites.com/ai-vulnerabilities/cve-2026-70477-flowise-csv-agent-can-run-python-code-sent-by/
### Why this matters
An attacker can send a crafted message to a Flowise chatflow that uses the CSV Agent node. The system will generate and run Python code that the attacker controls, letting them read files, steal data, install malware, or take over the server. This happens without requiring a login.
### What to do
1. Find where Flowise is installed
2. Check the current version
3. Back up your Flowise data and configuration
4. Upgrade both packages to version 3.1.3 or later
5. Restart the Flowise service
6. Verify the upgrade was successful
7. Review logs for signs of past attacks
8. Review and test your CSV Agent chatflows
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-70477-flowise-csv-agent-can-run-python-code-sent-by/
### 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
- [ ] Confirm that both flowise and flowise-components packages are version 3.1.3 or later by running npm list flowise flowise-components and that the Flowise service has restarted successfully.
- [ ] 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 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
- Flowise can read and change OAuth2 credentials from other workspaces High · CVE-2026-70474
The same kind of mistake in other AI tools
- markdownify-mcp can be made to read files outside the allowed folder list High · CVE-2026-140424
- ag2 and autogen shell tool can run any command via newline in command string High · CVE-2026-113663
- Flowise chatflow can be hijacked through unguarded configuration override High · CVE-2026-69258
- Flowise CSV Agent runs code from language model without checks Critical · CVE-2026-41264
- Flowise can be made to run attacker code through the Airtable Agent Critical · CVE-2026-41265
Change history
- 4 Aug 2026: Made public
- 2 Dec 2026: Published
Official record
-- ABSTRACT -------------------------------------Trend Micro's Zero Day Initiative has identified a vulnerability affecting the following products: Flowise - Flowise-- VULNERABILITY DETAILS ------------------------ * Version tested: 3.1.1 * Installer file: https://github.com/FlowiseAI/Flowise (npm install flowise@3.1.1) * Platform tested: Ubuntu 25.10---A prompt injection sent to a chatflow using a CSV Agent node can cause the LLM to respond with a malicious Python script that bypasses the blocklist validator and executes in an unsandboxed pyodide environment. An attacker can leverage this to execute arbitrary code in the context of the user running the server.``` This vulnerability allows remote attackers to execute arbitrary code on affected installations of Flowise. Authentication is not required to exploit this vulnerability.The specific flaw exists within the run method of the CSV_Agents class. The issue results from insufficient input sanitization when using untrusted data to construct an LLM prompt. An attacker can leverage this vulnerability to execute code in the context of the service account. ```### AnalysisWhen a user makes a query against a chatflow using the CSV Agent node, the `run` method of the `CSV_Agents` class is called. This method reads the CSV file, loads a pyodide environment, and uses pandas to extract column names and data types into a dictionary. It then constructs a system prompt using that dictionary and the user's input, and sends this prompt to a configured LLM. The LLM response is stored in a variable named `pythonCode`. The method then attempts to validate this value using `validatePythonCodeForDataFrame` from `packages/components/src/pythonCodeValidator.ts` before evaluating it in pyodide.The validator relies on a static regex blocklist. It can be bypassed using obfuscation techniques including string concatenation to reconstruct forbidden identifiers, `chr()` encoding, aliasing of dangerous builtins, `__getattribute__` with concatenated attribute names, frame object inspection, MRO traversal, `df.query()` expression evaluation, and decorator syntax to invoke `exec` indirectly. Furthermore, pyodide is not sandboxed from the host operating system, so any Python code that passes the validator is executed with full access to OS interfaces.From `packages/components/nodes/agents/CSVAgent/CSVAgent.ts`: ```ts let pythonCode = '' if (dataframeColDict) { const chain = new LLMChain({ llm: model, prompt: PromptTemplate.fromTemplate(systemPrompt), verbose: process.env.DEBUG === 'true' ? true : false }) const inputs = { dict: dataframeColDict, question: input // user-controlled input substituted into prompt } const res = await chain.call(inputs, [loggerHandler, ...callbacks]) pythonCode = res?.text // LLM response assigned to pythonCode pythonCode = pythonCode.replace(/^```[a-z]+\n|\n```$/gm, '') }let finalResult = '' if (pythonCode) { const validation = validatePythonCodeForDataFrame(pythonCode) // blocklist validation applied if (!validation.valid) { throw new Error( `Generated code was rejected for security reasons (${ validation.reason ?? 'unsafe construct' }). Please rephrase your question to use only pandas DataFrame operations.` ) } try { const code = `import pandas as pd\nimport numpy as np\n${pythonCode}` finalResult = await pyodide.runPythonAsync(code) // executed in unsandboxed pyodide } catch (error) { throw new Error(`Sorry, I'm unable to find answer for question: "${input}" using following code: "${pythonCode}"`) } } ```An unauthenticated attacker with the ability to send prompts to a chatflow using the CSV Agent node may use prompt injection to cause the LLM to respond with a malicious Python script. An authenticated attacker may instead configure a chatflow that points to an attacker-controlled ser
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-70477For 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.