CVE-2024-5753: SQL Injection Vulnerability in vanna

vanna Updated 02 Oct 2025

Summary

05/07/2024
No i
High
7.5

CVE-2024-5753: Vanna vulnerable to SQL Injection. Affects vanna versions < 0.3.4. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Vanna is a Python package available on PyPI that provides various functionalities for AI applications. It includes critical file-handling functions like pg_read_file(). This vulnerability affects vanna version v0.3.4. The vulnerability allows unauthenticated remote users to exploit exposed SQL queries via a Python Flask API, leading to SQL injection. This can result in the unauthorized reading of arbitrary local files on the victim server, including sensitive files like /etc/passwd.

Vulnerability Detail

The SQL injection vulnerability in vanna version v0.3.4 allows remote attackers to execute arbitrary SQL commands through the exposed SQL queries. By manipulating the input parameters, an attacker can inject malicious SQL code, which can lead to unauthorized access to sensitive files on the victim server. This vulnerability has a CVSSv3 score of 7.5, indicating a high severity level.

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, users can implement input validation and sanitization techniques to mitigate the risk of SQL injection attacks. By validating and sanitizing user input, the chances of successful exploitation can be reduced. Here is an example of input validation using Python Flask:

from flask import request
from werkzeug.exceptions import BadRequest

@app.route('/endpoint', methods=['POST'])
def endpoint():
    input_param = request.form.get('input_param')
    if not input_param:
        raise BadRequest('Input parameter is required.')
    # Perform further processing

This code snippet demonstrates how to validate and ensure the input_param is not empty before further processing.

Conclusion

The SQL injection vulnerability in vanna version v0.3.4 exposes critical file-handling functions to potential exploitation. Unauthenticated remote attackers can read arbitrary local files on the victim server, including sensitive files. It is crucial to update to a patched version of vanna and implement input validation to mitigate the risk of SQL injection attacks.

See every vulnerability recorded for vanna →

Share this vulnerability

FAQ

The vulnerability allows unauthenticated remote attackers to read arbitrary local files on the victim server, including sensitive files. This can lead to unauthorized access to sensitive information and potential further exploitation.

No, authentication is not required. Unauthenticated remote users can exploit the vulnerability by manipulating the input parameters and injecting malicious SQL code.

The vulnerability affects vanna version v0.3.4. Earlier versions may also be affected, but the exact range of affected versions is not specified.

Yes, the maintainers of vanna have released a fix for this vulnerability in a later version. Users are advised to update their vanna package to a version beyond v0.3.4 to mitigate the risk.

The CVSSv3 score of this vulnerability is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback