Summary
Vanna v2.0.2 contains a critical code injection vulnerability in VannaBase.get_plotly_figure that may allow attacker-controlled code or commands to execute. The risk is highest when an exposed application entry passes attacker-influenced data into this functionality without adequate validation or isolation.
Vanna v2.0.2 contains a critical code injection vulnerability in VannaBase.get_plotly_figure that may allow attacker-controlled code or commands to execute. The risk is highest when an exposed application entry passes attacker-influenced data into this functionality without adequate validation or isolation.
Affected context
The vulnerability occurs in the legacy Vanna base implementation, specifically the VannaBase.get_plotly_figure method. Deployments may be exposed when this method is reachable through an application, API, notebook service, or other entry point that permits untrusted users or external inputs to influence plot generation.
The vulnerability occurs in the legacy Vanna base implementation, specifically the VannaBase.get_plotly_figure method. Deployments may be exposed when this method is reachable through an application, API, notebook service, or other entry point that permits untrusted users or external inputs to influence plot generation.
Exploit preconditions
- Attack surface: An application or service exposing functionality that invokes
VannaBase.get_plotly_figure - Required access: Ability to reach the exposed entry and provide or influence relevant input
- Trigger point: Processing of attacker-controlled data by the plot-generation method
- Why exploitation is possible: Input is handled in a way that can cause it to be interpreted as executable code or commands rather than treated strictly as data
- Attack surface: An application or service exposing functionality that invokes
VannaBase.get_plotly_figure - Required access: Ability to reach the exposed entry and provide or influence relevant input
- Trigger point: Processing of attacker-controlled data by the plot-generation method
- Why exploitation is possible: Input is handled in a way that can cause it to be interpreted as executable code or commands rather than treated strictly as data
Why this happens
The underlying bug is an insufficient separation between data and executable logic in a plot-generation code path. When attacker-controlled input reaches a dynamic evaluation or command-capable operation without strict validation, an attacker may influence program behavior or execution. This maps to CWE-94, Improper Control of Generation of Code, because externally influenced content can affect generated or interpreted code.
The underlying bug is an insufficient separation between data and executable logic in a plot-generation code path. When attacker-controlled input reaches a dynamic evaluation or command-capable operation without strict validation, an attacker may influence program behavior or execution. This maps to CWE-94, Improper Control of Generation of Code, because externally influenced content can affect generated or interpreted code.
Potential impact
- An attacker may execute arbitrary code within the Vanna application process.
- An attacker could execute operating-system commands with the application's privileges.
- Sensitive application data, credentials, or connected data sources may be exposed.
- The affected service could be altered, disrupted, or used for lateral movement.
- In multi-tenant deployments, other users or workloads may be impacted.
- An attacker may execute arbitrary code within the Vanna application process.
- An attacker could execute operating-system commands with the application's privileges.
- Sensitive application data, credentials, or connected data sources may be exposed.
- The affected service could be altered, disrupted, or used for lateral movement.
- In multi-tenant deployments, other users or workloads may be impacted.
General mitigation guidance
Mitigation generally focuses on preventing untrusted input from reaching
dynamic code-generation or command-execution paths.
Common defensive patterns include:
- Treating all external plot, query, and formatting input as untrusted data.
- Replacing dynamic evaluation with fixed, allowlisted operations and structured APIs.
- Applying strict input schemas, type checks, length limits, and allowlists for supported values.
- Separating rendering logic from execution-capable functionality.
- Running the service with least-privilege identities and restricting filesystem, network, and process permissions.
- Isolating data-processing workers from sensitive systems and credentials.
- Applying secure-by-default authorization controls to every exposed entry point.
Mitigation generally focuses on preventing untrusted input from reaching
dynamic code-generation or command-execution paths.
Common defensive patterns include:
- Treating all external plot, query, and formatting input as untrusted data.
- Replacing dynamic evaluation with fixed, allowlisted operations and structured APIs.
- Applying strict input schemas, type checks, length limits, and allowlists for supported values.
- Separating rendering logic from execution-capable functionality.
- Running the service with least-privilege identities and restricting filesystem, network, and process permissions.
- Isolating data-processing workers from sensitive systems and credentials.
- Applying secure-by-default authorization controls to every exposed entry point.
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis rules identifying dynamic evaluation, shell invocation, template execution, or code-generation constructs near user-controlled data.
- Code review checks for string concatenation or interpolation used to build executable expressions or commands.
- Tests that submit unexpected types, delimiters, and malformed structured inputs to exposed plotting interfaces.
- Runtime monitoring for unusual child processes, command interpreters, outbound connections, or access to sensitive files.
- Policy enforcement that blocks unapproved execution APIs and requires review for code-generation features.
- Automated security review tools that flag data-to-code flows for manual validation.
Organizations can look for this weakness through:
- Static analysis rules identifying dynamic evaluation, shell invocation, template execution, or code-generation constructs near user-controlled data.
- Code review checks for string concatenation or interpolation used to build executable expressions or commands.
- Tests that submit unexpected types, delimiters, and malformed structured inputs to exposed plotting interfaces.
- Runtime monitoring for unusual child processes, command interpreters, outbound connections, or access to sensitive files.
- Policy enforcement that blocks unapproved execution APIs and requires review for code-generation features.
- Automated security review tools that flag data-to-code flows for manual validation.
Sources
| Source | Link |
|---|---|
| gist. | gist.github.com/ |
| github. | github.com/ |

