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

- Severity: Critical 9.8 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.88%, higher than 60% of CVEs (2026-12-01)
- Published: 2024-06-27T18:40:37.441Z
- Modified: 2026-07-01T20:23:10.996Z
- Also known as: GHSA-rrqq-fv6m-692m, PYSEC-2026-562
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- 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.

(As written by CVE List.)

## Affected

- vanna-ai vanna-ai/vanna: from unspecified up to latest
- vanna-ai vanna: 0
- vanna (PyPI): up to 0.6.2

## Every score

- @huntr_ai: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://huntr.com/bounties/90620087-44ac-4e43-b659-3c5d30889369> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5826> (advisory)
- <https://github.com/vanna-ai/vanna> (package)
- <https://pypi.org/project/vanna> (package)
- <https://github.com/advisories/GHSA-rrqq-fv6m-692m> (advisory)

## Sources

- CVE List: [CVE-2024-5826](https://www.cve.org/CVERecord?id=CVE-2024-5826), CVE Terms of Use, modified 2025-10-15
- GitHub Advisory Database: [GHSA-rrqq-fv6m-692m](https://github.com/advisories/GHSA-rrqq-fv6m-692m), CC-BY-4.0, modified 2026-06-29
- NVD: [CVE-2024-5826](https://nvd.nist.gov/vuln/detail/CVE-2024-5826), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-562](https://osv.dev/vulnerability/PYSEC-2026-562), CC-BY-4.0, modified 2026-07-01

---

Page: https://cve.day/CVE-2024-5826 · Whole record: https://cve.day/CVE-2024-5826.json · Rebuilt by cve.day 2026-11-25T22:58:42.293Z
