Skip to main content
VulnerabilityPublished Updated

CVE-2024-5826: vanna-ai/vanna · Code Injection

Affects vanna-ai/vannaSource CVE Database V5

0

Not known to be exploited · CVSS 9.8 Critical.

Data as of 26 Oct 2026, 14:05 UTC

CVSS 3.0 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.8% chance of exploitation in 30 days – higher than 58% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 27 Jun 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

AI-suggested

Immediate mitigation steps include disabling or restricting the use of the `vanna.ask` function until a secure patch is available. Organizations should implement sandboxing or containerization to isolate the execution environment of any LLM-generated code, preventing unauthorized system access. Input validation and sanitization must be enforced rigorously to detect and block prompt injection attempts. Employing allowlists for permissible code constructs or commands can reduce risk. Monitoring and logging of all code execution requests should be enhanced to detect anomalous behavior indicative of exploitation attempts. Network-level protections such as web application firewalls (WAFs) can be tuned to identify suspicious payloads targeting the vulnerable function. Organizations should also track vendor advisories for patches and apply them promptly. Conducting security reviews of AI integration points and educating developers on secure coding practices for dynamic code execution are recommended. Finally, implementing least privilege principles for the backend server environment limits the potential damage of a successful exploit.

Description

In the latest version of vanna-ai/vanna, the `vanna.ask` function is vulnerable to remote code execution due to prompt injection. The root cause is 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`. This vulnerability can be exploited by an attacker to achieve remote code execution on the app backend server, potentially gaining full control of the server.

References

Community reviews

Loading reviews…