Details
Impact
| Attack | Impact | Auth Required | Config Required |
|--------|--------|---------------|-----------------|
| pd.read_json/csv/html exfiltration | Full dataset theft to external server | None | Default |
| pd.read_csv SSRF | Internal service access, cloud metadata | None | Default |
| np.ctypeslib | Native library loading (limited in Pyodide/Wasm) | None | Default |
| importlib evasion | Python import machinery access | None | Default |
| chr() name construction | Runtime bypass of name-based blocklist | None | Default |
Data at risk:
- All CSV data loaded into the agent's DataFrame
- All Airtable data loaded via the Airtable Agent
- Internal network topology via SSRF responses
- Cloud credentials via metadata endpoints (AWS/GCP/Azure)
Relationship to GHSA-3hjv-c53m-58jj
GHSA-3hjv-c53m-58jj (ZDI-CAN-29411), published April 15, 2026 by Trend Micro's Zero Day Initiative, describes the same vulnerability class -- prompt injection leading to code execution via the CSV Agent's Python validator. That advisory was tested against Flowise 3.0.13 and claims a fix in 3.1.0.
What ZDI found (patched)
The ZDI bypass exploited the import regex in the v3.0.13 validator:
// v3.0.13 validator -- allows importing alongside pandas/numpy
{ pattern: /\bimport\s+(?!pandas|numpy\b)/g, reason: '...' }
This regex used a negative lookahead to permit import pandas and import numpy while blocking other imports. The bypass was:
import pandas as np, os as pandas
pandas.system("xcalc")
Because pandas appears immediately after import, the lookahead passes. The os module is imported alongside it with the alias pandas, enabling arbitrary OS command execution.
The 3.1.0 patch tightened the import regex to block ALL import statements:
// v3.1.0+ validator -- blocks all imports
{ pattern: /\bimport\b/g, reason: 'import statement (all imports forbidden; pandas and numpy are pre-imported by the executor)' }
Additional patterns for vars(), dir(), __dict__, and __module__ were also added.
How this advisory differs
The bypass vectors in this report are fundamentally different from ZDI's and are not addressed by the 3.1.0 patch:
| | GHSA-3hjv-c53m-58jj (ZDI) | This Advisory |
|---|---|---|
| Affected versions | <= 3.0.13 | 3.1.0 through 3.1.2 |
| Bypass technique | Import aliasing (import pandas as np, os as pandas) | No imports needed -- uses pre-imported pd/np methods that make HTTP requests |
| Requires `import` keyword | Yes | No |
| Fixed by `/\bimport\b/g` | Yes | No |
| Primary impact | Arbitrary OS command execution | Data exfiltration, SSRF, potential RCE via ctypeslib/importlib |
| Attack complexity | Moderate (must trick LLM into specific import syntax) | Low (trivial pd.read_json() call, natural pandas usage) |
The critical distinction: ZDI's bypass required the import keyword, which the patch now blocks. Our bypasses require no imports at all because the execution environment pre-injects import pandas as pd and import numpy as np before running the LLM-generated code. The entire attack surface of the pre-imported pandas and numpy APIs is available to the attacker without ever triggering the import filter.
Running the validator against both the ZDI bypass and our vectors confirms the gap:
BYPASSED pd.read_json exfil (this advisory)
BYPASSED pd.read_csv SSRF (this advisory)
BYPASSED np.ctypeslib (this advisory)
BYPASSED chr() construction (this advisory)
BYPASSED pd.read_html exfil (this advisory)
BLOCKED ZDI import aliasing (GHSA-3hjv-c53m-58jj -- fixed)
BLOCKED import os (control case)
Why the regex blocklist approach is insufficient
Both the ZDI finding and this advisory demonstrate the same underlying architectural weakness: a regex blocklist cannot secure a code execution environment. Each time a specific pattern is blocked, new vectors emerge because:
- The Python language has extensive introspection and metaprogramming capabilities
- Pre-imported libraries (pandas, numpy) expose large API surfaces including network I/O
- String manipulation (
chr(), concatenation) can construct any identifier at runtime - Word boundary regex (
\b) has well-defined edge cases that can be exploited
A durable fix requires switching from a blocklist to an allowlist approach (AST-based validation) or eliminating server-side code execution entirely.
Remediation
- Replace regex blocklist with AST-based allowlist: Parse the Python code into an AST. Only allow method calls on
dffrom a curated set of safe pandas/numpy operations. Reject everything else by default.
- Block URL-accepting pandas functions: As an immediate mitigation, add patterns for
pd.read_json,pd.read_html,pd.read_csv,pd.read_fwf,pd.read_sql,pd.read_tablewith URL arguments. Also blocknp.ctypeslib.
- Network isolation for Pyodide: Run the Pyodide instance without outbound network access. Use a sandboxed worker or E2B execution environment.
- URL detection: Before or after LLM code generation, scan for URL-like strings (
http://,https://,ftp://) and reject code containing them.
- Allowlist approach for function calls: Instead of blocking known-bad patterns, only allow known-safe pandas DataFrame operations (e.g.,
df.head(),df.describe(),df.groupby(),df.sort_values(), etc.).
Credit
Peyton Kennedy(p80n-sec) of Endor Labs
References
- Original advisory: GHSA-3hjv-c53m-58jj
- Flowise GitHub: https://github.com/FlowiseAI/Flowise
- Python validator (3.1.2):
packages/components/src/pythonCodeValidator.tslines 17-74 - CSV Agent:
packages/components/nodes/agents/CSVAgent/CSVAgent.tslines 197-209 - Airtable Agent:
packages/components/nodes/agents/AirtableAgent/AirtableAgent.tslines 185-197 - Prediction endpoint whitelist:
packages/server/src/utils/constants.tsline 12