Documented Incident · INC-2024-5565 · High severity
Vanna.AI Visualization Prompt Injection Escalating to Host Python Execution
CVE-2024-5565 uncovered an indirect prompt-injection-to-RCE chain in the Vanna.AI text-to-SQL visualization library's `ask()` workflow. The library prompted an LLM to generate Plotly Python plotting code from query results and immediately ran that generated Python code via `exec()` on the application server. Crafted user questions or poisoned database values steered the model to emit arbitrary OS commands inside the visualization block. Maintainers and enterprise deployments moved toward declarative JSON chart specs instead of executing generated Python scripts.
Incident dossier metadata
- Case ID
INC-2024-5565- Classification
- Incident
- Date
- Severity
- High
- Sector
- Enterprise Data & Analytics
- Attack vector
- Indirect Prompt Injection
- System type
- Text-to-SQL & Automated Chart Generation Libraries
- CVE / reference
CVE-2024-5565- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-5565
Defensive takeaway
Render charts declaratively using structured JSON specifications such as Vega-Lite or ECharts configs instead of executing model-generated Python code.
Mapped AI security techniques
- Command and Scripting Interpreter AML.T0050
- LLM Prompt Injection: Direct AML.T0051.000
- LLM Prompt Injection: Indirect AML.T0051.001
- AI Agent Tool Invocation AML.T0053
- Generate Malicious Commands AML.T0102
Mapped defensive controls
- Restrict Library Loading AML.M0011
- Enforce Access Controls for AI Agent Tools AML.M0028
- Segmentation of AI Agent Components AML.M0032
- Input and Output Validation for AI Agent Components AML.M0033
Source citation records
- NVD Record CVE-2024-5565: Vanna.AI Visualization Code Execution via Prompt Injection · NIST National Vulnerability Database (NVD) ·