{"id":"CVE-2024-7764","state":"PUBLISHED","title":"SQL Injection in vanna-ai/vanna","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.","publishedAt":"2025-03-20T10:11:35.662Z","updatedAt":"2025-03-20T13:43:43.656Z","severity":{"score":8.1,"label":"High","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","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/85d403b1-fbed-42e9-9ec1-2f79abf6eb0f"],"weaknesses":["CWE-89"],"ingestedAt":"2026-10-29T20:08:20.985Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/7xxx/CVE-2024-7764.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-7764","state":"PUBLISHED","datePublished":"2025-03-20T10:11:35.662Z","dateUpdated":"2025-03-20T13:43:43.656Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2024-08-13T18:24:14.074Z"},"containers":{"cna":{"title":"SQL Injection in vanna-ai/vanna","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"vanna-ai","product":"vanna-ai/vanna","versions":[{"version":"unspecified","status":"affected","lessThanOrEqual":"latest","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/85d403b1-fbed-42e9-9ec1-2f79abf6eb0f"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","baseScore":8.1,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-89","type":"CWE","lang":"en","description":"CWE-89 Improper Neutralization of Special Elements used in an SQL Command"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2025-03-20T10:11:35.662Z"},"source":{"advisory":"85d403b1-fbed-42e9-9ec1-2f79abf6eb0f","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-03-20T13:43:19.044296Z","id":"CVE-2024-7764","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":"2025-03-20T13:43:43.656Z"}}]}}}