CVE-2026-73487
Flowise validator bypass allows unauthenticated RCE via prompt injection.
- CVSS 9.0
- 94
- Input Validation and Sanitization
- Remote
Flowise before 3.1.3 contains a regex-based Python code validator bypass in CSV and Airtable Agent nodes that allows unauthenticated attackers to inject malicious code via prompt injection. Attackers can exploit unblocked pandas functions like pd.read_json() to exfiltrate datasets, perform SSRF against internal services, or achieve code execution through the unauthenticated prediction API.
- CWE
- 94
- CVSS base score
- 9.0
- Published
- 2026-08-13
- OWASP
- A03 Injection
- Orthogonal defect classification
- Checking
- Code defect classification
- Incorrect Check
- Category
- Input Validation and Sanitization
- Subcategory
- Command Injection
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- Flowise
- Fixed by upgrading
- Yes
Solution
Upgrade to Flowise version 3.1.3 or later.
Vulnerable code sample
import re
import pandas as pd
# Regex to block a few known dangerous keywords.
# This list is incomplete and is the source of the vulnerability.
FORBIDDEN_KEYWORD_REGEX = re.compile(
r"import|exec|eval|open|subprocess|os|sys|pickle"
)
def execute_agent_code(code: str, df: pd.DataFrame):
"""
Executes python code generated by an LLM to manipulate a DataFrame.
The code is validated against a regex-based blocklist first.
"""
# VULNERABLE: A simple regex-based blocklist is used for validation. This can be
# bypassed by using allowed library functions for unintended purposes (e.g., I/O).
if FORBIDDEN_KEYWORD_REGEX.search(code):
raise ValueError("Disallowed keyword detected in the generated code.")
# The 'pd' object is made available to the executed code, allowing
# an attacker to call any pandas function not on the blocklist.
# A safe alternative would use a sandboxed execution environment.
exec(code, {"df": df, "pd": pd})
return dfPatched code sample
import ast
import pandas as pd
# Blocklist of dangerous pandas functions that can perform I/O or code execution.
DANGEROUS_PANDAS_FUNCTIONS = {
'read_csv', 'read_json', 'read_excel', 'read_sql', 'read_html',
'read_pickle', 'to_pickle', 'eval'
}
def execute_agent_code(code: str, df: pd.DataFrame):
"""
Executes python code generated by an LLM to manipulate a DataFrame.
The code is validated by parsing it into an AST first.
"""
tree = ast.parse(code)
# FIX: The code is parsed into an AST. Calls to pandas I/O functions
# are explicitly blocked to prevent data exfiltration or SSRF.
for node in ast.walk(tree):
if (isinstance(node, ast.Call) and
isinstance(node.func, ast.Attribute) and
isinstance(node.func.value, ast.Name) and
node.func.value.id == 'pd' and
node.func.attr in DANGEROUS_PANDAS_FUNCTIONS):
raise ValueError(f"Disallowed pandas function call: {node.func.attr}")
# The 'pd' object is made available to the executed code.
# A safe alternative would use a sandboxed execution environment.
exec(code, {"df": df, "pd": pd})
return dfPayload
__VAITP_MODEL_REFUSED__
Cite this entry
@misc{vaitp:cve202673487,
title = {{Flowise validator bypass allows unauthenticated RCE via prompt injection.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-73487},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-73487/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
