{"id":"CVE-2024-5826","aliases":["CVE-2024-5826","GHSA-rrqq-fv6m-692m","PYSEC-2026-562"],"related":[],"kind":"vulnerability","state":"published","title":"Remote Code Execution via Prompt Injection in vanna-ai/vanna","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"En la última versión de vanna-ai/vanna, la función `vanna.ask` es vulnerable a la ejecución remota de código debido a la inyección rápida. La causa principal es la falta de una zona de pruebas al ejecutar código generado por LLM, lo que permite a un atacante manipular el código ejecutado por la función `exec` en `src/vanna/base/base.py`. Un atacante puede aprovechar esta vulnerabilidad para lograr la ejecución remota de código en el servidor backend de la aplicación, obteniendo potencialmente el control total del servidor.","source":"nvd"}],"published":"2024-06-27T18:40:37.441Z","modified":"2026-07-01T20:23:10.996Z","severity":{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","lastAffected":"latest","status":"affected"}],"vendor":"vanna-ai","product":"vanna-ai/vanna","source":"cvelist"},{"ranges":[{"version":"0","status":"affected"}],"vendor":"vanna-ai","product":"vanna","cpe":"cpe:2.3:a:vanna-ai:vanna:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.6.2"}],"ecosystem":"PyPI","package":"vanna","purl":"pkg:pypi/vanna","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.6.2"}],"ecosystem":"PyPI","package":"vanna","purl":"pkg:pypi/vanna","source":"pysec"}],"references":[{"url":"https://huntr.com/bounties/90620087-44ac-4e43-b659-3c5d30889369","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5826","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/vanna-ai/vanna","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/vanna","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-rrqq-fv6m-692m","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"@huntr_ai","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2024-06-28T15:19:12.368Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-5826","url":"https://www.cve.org/CVERecord?id=CVE-2024-5826","licence":"CVE Terms of Use","modified":"2025-10-15T12:50:29.876Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rrqq-fv6m-692m","url":"https://github.com/advisories/GHSA-rrqq-fv6m-692m","licence":"CC-BY-4.0","modified":"2026-06-29T12:26:37.506Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-5826","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5826","licence":"Public domain","modified":"2026-06-17T08:16:43.470Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-562","url":"https://osv.dev/vulnerability/PYSEC-2026-562","licence":"CC-BY-4.0","modified":"2026-07-01T20:23:10.996Z"}],"updatedAt":"2026-11-25T22:58:42.293Z","epss":{"score":0.00875,"percentile":0.60031,"date":"2026-12-01T12:00:22.000Z"}}