INCIDENT MAP

Browse / Direct Prompt Injection / CVE-2024-5565

Vanna prompt injection code execution

CVE-2024-5565 · 2024-05-31 critical

Class
Direct Prompt Injection (filed by a model that read the advisory)
Technique
Code and command execution
Also involves
Improper Output Handling
Affected
vanna (PyPI)
CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
15.2% chance of exploitation in 30 days

How it works, in short

User text passed to the ask method can override the prompt that generates visualisation code, so the model emits Python that the library then executes. (Our summary, written by a model. The source text is below.)

Details

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.