Summary
Flowise contains a code injection vulnerability in the CSV Agent node's customReadCSV parameter, where authenticated users can submit Python code that bypasses inadequate validation. Successful exploitation may allow arbitrary code execution in the unsandboxed Pyodide environment with access to the underlying system.
Affected context
The vulnerability occurs in Flowise deployments that expose the CSV Agent node to authenticated users and process the customReadCSV parameter through a static regular-expression blocklist. The risk is greater when this parameter is user-controlled and the resulting Python executes in an unsandboxed environment with broad system permissions.
Exploit preconditions
- Attack surface: The Flowise CSV Agent node and its
customReadCSVparameter - Required access: Authenticated access sufficient to create or modify workflows using the affected node
- Trigger point: Processing the custom CSV-reading logic
- Why exploitation is possible: The validator relies on a bypassable regex blocklist, allowing obfuscated code to reach an unsandboxed Python execution environment
Why this happens
The underlying flaw is the use of denylist-based regular-expression validation for input that is later interpreted as executable Python code. Static blocklists are incomplete and can often be bypassed through obfuscation, while executing the accepted input without effective sandbox isolation converts validation gaps into arbitrary code execution. This behavior maps to CWE-94: Improper Control of Generation of Code, because attacker-influenced data is treated as executable logic.
Potential impact
- An attacker may execute arbitrary Python code in the Flowise process context
- The attacker could access or modify files and environment data available to the runtime
- Application secrets, tokens, or workflow data may be exposed
- The compromise could enable tampering with workflows or connected services
- Systems reachable from the affected runtime may be targeted for lateral movement
General mitigation guidance
Mitigation generally focuses on removing dynamic code execution from user-controlled parameters and reducing trust in workflow inputs.
Common defensive patterns include:
- Replacing executable custom parameters with declarative, schema-validated configuration
- Using allowlisted operations and structured parsers instead of regex blocklists
- Avoiding execution of user-supplied Python or isolating unavoidable execution in a strongly sandboxed, disposable environment
- Running the application with least privilege and restricting filesystem, network, and secret access
- Applying strict authorization and tenant isolation to workflow editing and execution
- Treating workflow definitions and node parameters as untrusted input throughout their lifecycle
How teams detect issues like this
Detection can combine static analysis, runtime monitoring, and workflow governance controls.
- Search source code and dependencies for dynamic evaluation, Python execution bridges, and regex-based blocklists protecting executable inputs.
- Review code paths where CSV Agent parameters or other workflow fields are transformed into source code or interpreter commands.
- Monitor for unusual workflow changes, unexpected Python execution, child processes, filesystem access, and outbound connections from Flowise workloads.
- Enforce policies that prohibit user-controlled code execution and require schema validation for node parameters.
- Automated code review and software composition analysis tools may help identify dangerous interpreter boundaries and insecure validation patterns.

