Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. vanna
  4. ›
  5. CVE-2024-5826

CVE-2024-5826: vanna vulnerable to remote code execution caused by prompt injection

June 27, 2024 (updated June 28, 2024)

In the latest version of vanna-ai/vanna, the vanna.ask function is vulnerable to remote code execution due to prompt injection. The root cause is the lack of a sandbox when executing LLM-generated code, allowing an attacker to manipulate the code executed by the exec function in src/vanna/base/base.py. This vulnerability can be exploited by an attacker to achieve remote code execution on the app backend server, potentially gaining full control of the server.

References

  • github.com/advisories/GHSA-rrqq-fv6m-692m
  • github.com/vanna-ai/vanna
  • huntr.com/bounties/90620087-44ac-4e43-b659-3c5d30889369
  • nvd.nist.gov/vuln/detail/CVE-2024-5826

Code Behaviors & Features

Detect and mitigate CVE-2024-5826 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 0.6.2

Solution

Unfortunately, there is no solution available yet.

Impact 9.8 CRITICAL

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/vanna/CVE-2024-5826.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:52 +0000.