CVE-2024-5826
Python vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Mitigation and workarounds

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).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-9mv7-3c64-mmqwHIGH8.7
  • PythonPython
  • xml2rfc
NoYesSep 10, 2025
GHSA-jgw4-cr84-mqxgHIGH7.8
  • PythonPython
  • picklescan
NoYesSep 10, 2025
GHSA-mjqp-26hc-grxgHIGH7.5
  • PythonPython
  • picklescan
NoYesSep 10, 2025
CVE-2025-10193HIGH7.4
  • PythonPython
  • mcp-neo4j-cypher
NoYesSep 11, 2025
CVE-2025-58065MEDIUM6.5
  • PythonPython
  • flask-appbuilder
NoYesSep 11, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management