{"id":"CVE-2024-5826","state":"PUBLISHED","title":"Remote Code Execution via Prompt Injection in vanna-ai/vanna","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.","publishedAt":"2024-06-27T18:40:37.441Z","updatedAt":"2025-10-15T12:50:29.876Z","severity":{"score":9.8,"label":"Critical","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"@huntr_ai"},"assigner":"@huntr_ai","products":["vanna-ai vanna-ai/vanna"],"affected":[{"vendor":"vanna-ai","product":"vanna-ai/vanna","versions":[{"version":"unspecified","status":"affected","lessThanOrEqual":"latest","versionType":"custom"}]}],"references":["https://huntr.com/bounties/90620087-44ac-4e43-b659-3c5d30889369"],"weaknesses":["CWE-94"],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/5xxx/CVE-2024-5826.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-5826","state":"PUBLISHED","datePublished":"2024-06-27T18:40:37.441Z","dateUpdated":"2025-10-15T12:50:29.876Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2024-06-10T22:43:12.603Z"},"containers":{"cna":{"title":"Remote Code Execution via Prompt Injection in vanna-ai/vanna","descriptions":[{"lang":"en","value":"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":[{"vendor":"vanna-ai","product":"vanna-ai/vanna","versions":[{"version":"unspecified","status":"affected","lessThanOrEqual":"latest","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/90620087-44ac-4e43-b659-3c5d30889369"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","type":"CWE","lang":"en","description":"CWE-94 Improper Control of Generation of Code"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2025-10-15T12:50:29.876Z"},"source":{"advisory":"90620087-44ac-4e43-b659-3c5d30889369","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"vanna-ai","product":"vanna","defaultStatus":"unknown","versions":[{"version":"0","status":"affected"}],"cpes":["cpe:2.3:a:vanna-ai:vanna:-:*:*:*:*:*:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-06-28T15:19:12.368194Z","id":"CVE-2024-5826","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-28T15:26:27.620Z"}},{"title":"CVE Program Container","references":[{"url":"https://huntr.com/bounties/90620087-44ac-4e43-b659-3c5d30889369","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T21:25:02.677Z"}}]}}}