CVE-2024-5827
Arbitrary File Write by Prompt Injection via DuckDB SQL in vanna-ai/vanna
Record summary
CVE-2024-5827 has a selected CVSS score of 9.8 (critical); EIP currently links 1 Nuclei template.
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.
Exploitation context
Known exploitation
- VulnCheck KEV
- Listed · Dec 5, 2024 · VulnCheck
- Reported exploitation
- Observed · VulnCheck
Available material
- Nuclei templates
- 1
CISA SSVC decision
CISA Coordinator · SSVC 2.0.3 · Evaluated Jul 1, 2024 · Source: CVE List
Affected products and versions
2| Product | Source | Version range | Status |
|---|---|---|---|
Default status: affected | VulnCheck, CVE List | 0.3.4 | affected |
vanna-ai/vannaBrowse vanna-ai / vanna-ai/vanna | CVE List | Through latest | affected |
Nuclei templates
1ProjectDiscoveryCRITICALVanna - SQL injectionCVSS 9.8
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.
Impact
Unauthenticated attackers can exploit SQL injection to inject malicious training data and write arbitrary files on the victim's filesystem, including PHP backdoors, leading to remote code execution.
Remediation
Update Vanna to version 0.3.5 or later to address the SQL injection vulnerability in the DuckDB integration.
Source: ProjectDiscovery