Skip to content
OpenAdvisories
Critical · 9.8 CVE-2024-5826 EUVD-2024-2162GHSA-rrqq-fv6m-692mPYSEC-2026-562

Remote Code Execution via Prompt Injection in vanna-ai/vanna

Published Jun 27, 2024 · Updated Oct 15, 2025 · Assigned by @huntr_ai

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.

Affected products

VendorProductAffectedFixed
vanna-ai vanna-ai/vanna unspecified – ≤ latest —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI vanna <= 0.6.2 — GHSA-rrqq-fv6m-692m

References