CVE-2024-5565: Vanna Package Vulnerability Leading to Prompt Injection and Code Execution
Summary
CVE-2024-5565: Vanna prompt injection code execution. Affects vanna versions < 0.5.5. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Vanna library is a Python package designed to visualize results through a prompt function. It allows users to interact with data in a user-friendly manner, providing visual outputs based on user input. However, due to its design, Vanna is susceptible to prompt injection attacks, which can lead to severe security risks.
Vulnerability Detail
The vulnerability arises from the way Vanna handles external input in its 'ask' method when the 'visualize' parameter is set to True (the default setting). This allows an attacker to inject malicious code into the prompt, leading to arbitrary Python code execution. The implications of this vulnerability are significant, as it can enable remote code execution, potentially compromising the entire system running the affected version of Vanna.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, avoid using the 'visualize' parameter set to True in the 'ask' method. Instead, sanitize any external inputs before passing them to the method to prevent prompt injection.
Conclusion
The Vanna library has a critical vulnerability (CVE-2024-5565) that allows for prompt injection and arbitrary code execution. It is essential to update to the latest version to protect your application from potential attacks. Regular monitoring for vulnerabilities using tools like Vulert can help maintain security.
See every vulnerability recorded for vanna →
FAQ
Prompt injection is a type of attack where an attacker manipulates the input to a prompt function, allowing them to execute arbitrary code.
You can check if your application is affected by using the Vulert playground at Vulert Scanner, which monitors open-source vulnerabilities without requiring any signup.
The risks include remote code execution, which can lead to unauthorized access, data breaches, and potential system compromise.
Yes, a patch is available. Update the Vanna package to a version higher than 0.5.5 to mitigate the vulnerability.
If an immediate update is not possible, implement input sanitization as a temporary workaround to mitigate the risk of prompt injection.
Related vulnerabilities
Recent vulnerabilities recorded for vanna.