
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2024-5826 affects the latest version of vanna-ai/vanna, specifically the vanna.ask
function which is vulnerable to remote code execution through prompt injection. The vulnerability was discovered and disclosed on June 27, 2024. The affected component is the visualization feature in the Vanna.AI library, which is designed to provide text-to-SQL interface functionality (NVD, JFrog Blog).
The vulnerability stems from the lack of a sandbox when executing LLM-generated code, allowing an attacker to manipulate the code executed by the exec
function in src/vanna/base/base.py
. The issue specifically occurs in the visualization feature where Plotly code is generated dynamically via LLM prompting and code evaluation. The CVSS v3.0 base score is 9.8 (CRITICAL) with vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).
If exploited, this vulnerability can allow an attacker to achieve remote code execution on the app backend server, potentially gaining full control of the server. The impact is particularly severe as it can lead to complete system compromise through the execution of arbitrary Python code (NVD, JFrog Blog).
The Vanna.ai maintainer has added a hardening guide to educate users about preventing similar attacks. Security recommendations include implementing additional prompt injection tracing models, checking for output integrity, and sandboxing the execution environment when interfacing LLMs with critical resources such as databases or dynamic code generation (JFrog Blog).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."