Summary
Flowise AirtableAgent contained a code injection flaw where user input was embedded directly into a prompt template that was then reflected into Python code executed via Pandas.
An attacker who can control the question input can inject arbitrary Python expressions, potentially achieving remote code execution on the Flowise backend.
Affected context
This vulnerability affects Flowise deployments using the AirtableAgent integration prior to version 3.1.0.
The issue surfaces when user-provided input (the "question" parameter) is used to construct a prompt that is then translated into Python code, executed in an environment with Pandas available.
Systems are at higher risk when AirtableAgent flows are exposed to untrusted users over HTTP APIs or public-facing UI components where input is not restricted or moderated.
Exploit preconditions
- Attack surface: Application layer where AirtableAgent is exposed (e.g., Flowise UI endpoints, APIs, or embedded chat widgets).
- Required access: Ability to send arbitrary input to the AirtableAgent's question parameter (authenticated or unauthenticated, depending on deployment).
- Trigger point: Execution of a flow that uses AirtableAgent, causing the crafted question to be inserted into the prompt template and subsequently reflected into Python code.
- Why exploitation is possible: The question input is interpolated directly into a prompt that is converted to Python code without validation, escaping, or structural constraints, enabling injection of attacker-controlled code.
Why this happens
The root cause aligns with CWE-94: Improper Control of Generation of Code ('Code Injection').
Flowise AirtableAgent constructs Python code dynamically based on natural-language prompts and user input, but the user-supplied question value is inserted verbatim into the template.
Because the dynamic code generation layer does not enforce strict separation between user data and executable constructs, the interpreter treats crafted portions of the question as executable Python.
This pattern—combining string concatenation or interpolation with subsequent code execution—creates a direct path from untrusted input to runtime code evaluation.
Potential impact
- Execution of arbitrary Python code within the Flowise backend process.
- Reading, modifying, or deleting data accessible to the Flowise runtime, including Airtable-related data and local environment resources.
- Pivoting to other internal systems reachable from the compromised host.
- Exfiltration of sensitive configuration details, such as API keys, environment variables, or model credentials.
- Service disruption through process crashes, resource exhaustion, or destructive commands.
General mitigation guidance
Effective mitigation centers on eliminating direct code generation from untrusted input and constraining how prompts map to executable logic:
- Avoid constructing Python code via string concatenation or template interpolation that includes raw user input; treat user data strictly as data, not as code fragments.
- Introduce a strict intermediate representation or query language with explicit allowed operations, and validate user input against this schema before execution.
- Apply robust input validation and encoding for any dynamic content that influences code, formulas, or expressions, rejecting or neutralizing unsafe patterns.
- Restrict the execution environment by using least-privilege runtime configurations, such as limited filesystem access and network egress controls, to reduce impact if code injection occurs.
- Separate the model prompt layer from execution logic so that language-model outputs cannot directly become executable code without a controlled translation and validation step.
How teams detect issues like this
Organizations can detect and monitor for similar code injection risks using a combination of code-centric and runtime approaches:
- Static analysis: Flag instances where user input or request parameters flow into code-construction APIs, dynamic evaluation functions, or template strings that later influence execution (e.g., exec-like behavior, dynamic query builders, or DSL interpreters).
- Code review: Pay special attention to components that turn natural language prompts into executable code, checking for direct string interpolation of user data and absence of strict whitelisting or parsing.
- Security testing: Use fuzzing and dynamic application security testing (DAST) to send crafted inputs through Airtable-related flows and check for unexpected exceptions, stack traces, or signs of code execution.
- Runtime monitoring: Instrument logging around dynamic execution paths and set alerts for anomalous commands, unexpected imports, or access patterns originating from LLM-generated or user-derived code segments.
- Automated SAST and CI pipeline checks can help enforce policies against unsafe dynamic code generation patterns.

