{"id":"CVE-2024-5826","published":"2024-06-27T18:40:37Z","modified":"2025-10-15T12:50:29Z","title":"Remote Code Execution via Prompt Injection in vanna-ai/vanna","vendor":"vanna-ai","product":"vanna-ai/vanna","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00882,"percentile":0.60042,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://huntr.com/bounties/90620087-44ac-4e43-b659-3c5d30889369","tags":[]}],"priority":{"score":18.9,"factors":[{"name":"EPSS percentile","points":12.01},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"vanna-ai","affectedVersions":[{"vendor":"vanna-ai","product":"vanna-ai/vanna","versions":[">= unspecified, <= latest"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2024-06-28T15:19:12.368194Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"vanna","vulnerableRanges":["<=0.6.2"],"patched":[],"from":["GHSA-rrqq-fv6m-692m","PYSEC-2026-562"],"provenance":"source"}],"euvd":{"id":"EUVD-2024-2162","exploited":false,"provenance":"source"}}