# CVE-2024-7764: SQL Injection in vanna-ai/vanna

- Severity: High 8.1 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`
- 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.78%, higher than 57% of CVEs (2026-12-02)
- Published: 2025-03-20T10:11:35.662Z
- Modified: 2026-06-17T08:20:52.620Z
- Weaknesses: CWE-89
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: @huntr_ai

## Description

Vanna-ai v0.6.2 is vulnerable to SQL Injection due to insufficient protection against injecting additional SQL commands from user requests. The vulnerability occurs when the `generate_sql` function calls `extract_sql` with the LLM response. An attacker can include a semi-colon between a search data field and their own command, causing the `extract_sql` function to remove all LLM generated SQL and execute the attacker's command if it passes the `is_sql_valid` function. This allows the execution of user-defined SQL beyond the expected boundaries, notably the trained schema.

(As written by CVE List.)

## Affected

- vanna-ai vanna-ai/vanna: from unspecified up to latest

## References

- <https://huntr.com/bounties/85d403b1-fbed-42e9-9ec1-2f79abf6eb0f>

## Sources

- CVE List: [CVE-2024-7764](https://www.cve.org/CVERecord?id=CVE-2024-7764), CVE Terms of Use, modified 2025-03-20
- NVD: [CVE-2024-7764](https://nvd.nist.gov/vuln/detail/CVE-2024-7764), Public domain, modified 2026-06-17

---

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