CVE-2024-5565 Prompt Injection in "ask" API with visualization leads to RCE
Attackers can execute arbitrary Python code via prompt injection in the Vanna library's ask API when visualization is enabled.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-5565?
CVE-2024-5565 is a high-severity code injection vulnerability in vanna, published on 31 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The Vanna library uses a prompt function to present the user with visualized results, it is possible to alter the prompt using prompt injection and run arbitrary Python code instead of the intended visualization code. Specifically - allowing external input to the library’s “ask” method with "visualize" set to True (default behavior) leads to remote code execution.
Weakness: CWE-94
Which versions are affected by CVE-2024-5565?
3 open source packages ship an affected version, including vanna.
| Package | Affected | Fixed in |
|---|---|---|
vanna PyPI | All versions to 0.5.5 | None |
vanna PyPI | All versions to 0.5.5 | None |
vanna PyPI | All versions to 0.5.5 | None |
How do I fix CVE-2024-5565?
No fix has been published for CVE-2024-5565 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2024-5565 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-5565 exists.
Sources
Also known as GHSA-7735-w2jp-gvg6, PYSEC-2026-561.