Skip to content
HighVulnerabilityLLM-specific

CVE-2024-7764: Vanna-ai SQL injection through semicolon in generate_sql requests

Identifier
CVE-2024-7764
Published
Record updated
View JSON
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.8%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .

Summary

Vanna-ai v0.6.2 is affected by CVE-2024-7764, an SQL Injection flaw. The `generate_sql` function passes the LLM response to `extract_sql`, and an attacker can insert a semi-colon before their own command so that `extract_sql` discards the LLM-generated SQL and runs the attacker's command if it passes `is_sql_valid`. This lets user-defined SQL run beyond the trained schema.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.