Summary
Flowise contains a code injection vulnerability in the Airtable Agent node that allows unauthenticated attackers to execute arbitrary Python code through crafted chatflow prompts.
The risk arises when obfuscated input bypasses the Python code validator and reaches an unsandboxed Pyodide environment with access to the host operating system.
Affected context
The vulnerability affects Flowise chatflows that use the Airtable Agent node and process attacker-controlled prompts. It becomes risky when the node passes prompt-derived content to a Python execution environment, relies on a blocklist-based validator, and does not provide effective sandboxing or host isolation.
Exploit preconditions
- Attack surface: A Flowise chatflow exposed through a chat or API interface
- Required access: No authentication may be required when the affected chatflow is publicly reachable
- Trigger point: Processing a crafted prompt through the Airtable Agent node
- Why exploitation is possible: Obfuscation can bypass the Python code blocklist, allowing attacker-controlled code to execute in an unsandboxed Pyodide environment
Why this happens
The underlying issue is insufficiently trusted input reaching a code execution sink after validation based on a bypassable blocklist. This insecure pattern maps to CWE-94: Improper Control of Generation of Code, because application-controlled content can influence dynamically executed Python code.
Executing code in an environment with access to the host operating system further increases the impact of the injection flaw. Blocklists are inherently fragile because equivalent syntax, encoding, and obfuscation patterns may evade narrowly defined prohibited-token checks.
Potential impact
- An attacker may execute arbitrary Python code
- The attacker could read, modify, or delete accessible host files
- Application secrets, tokens, or environment variables may be exposed
- The vulnerable process may be used to access other internal services
- The host or surrounding deployment could be compromised
- Data integrity and workflow availability may be affected
General mitigation guidance
Mitigation generally focuses on removing dynamic code execution from attacker-influenced workflows and reducing the trust placed in prompts.
Common defensive patterns include:
- Replacing arbitrary Python execution with narrowly scoped, predefined operations
- Using allowlisted functions and structured parameters instead of source-code generation
- Treating prompts and agent output as untrusted data
- Applying validation after normalization and enforcing strict schemas
- Running unavoidable computation in a strongly isolated sandbox with no host filesystem, network, or sensitive environment access
- Applying least-privilege identities and resource limits to the Flowise process
- Requiring authentication and authorization for chatflows that can invoke sensitive agents
- Keeping secrets outside the execution environment and limiting their exposure
How teams detect issues like this
Detection approaches can include:
- Static analysis rules identifying dynamic Python execution, eval-like sinks, and prompt-derived data flows
- Code review checks for blocklist-only validation and string construction of executable code
- Tests using normalized, encoded, and obfuscated inputs to evaluate validator robustness
- Runtime monitoring for unexpected Python execution, filesystem access, process creation, or outbound connections
- Policy enforcement that prevents public exposure of chatflows with code-execution capabilities
- Automated security review tools that trace untrusted agent output into interpreters or shell-like execution paths

