Vulnerabilities in pkg:pypi/vanna

PACKAGE
Advisory Identifier: GHSA-6mj8-jmp2-g8q7
Advisory Summary

CVE-2026-4229 is a MODERATE (CVSS 7.3) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Vanna libraries in the PyPI ecosystem. The issue involves vanna has a sql injection in the remove_training_data function. Remediation is available in the latest vendor maintenance releases.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/vanna

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/vanna. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-6mj8-jmp2-g8q7 CVE-2026-4229 MODERATE Vanna has a SQL injection in the remove_training_data function
GHSA-mwxm-35f8-6vg2 CVE-2024-5753 HIGH Vanna vulnerable to SQL Injection
GHSA-7735-w2jp-gvg6 CVE-2024-5565 CRITICAL Vanna prompt injection code execution
GHSA-rrqq-fv6m-692m CVE-2024-5826 CRITICAL vanna vulnerable to remote code execution caused by prompt injection

CVE-2026-4229 at a Glance

CVE Identifier CVE-2026-4229
GHSA Identifier GHSA-6mj8-jmp2-g8q7
Severity MODERATE
CVSS v3.1 Base Score 7.3
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Vanna
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-4229

To remediate this vulnerability, upgrade all affected Vanna dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

vanna fixed: Latest secure release
pip install vanna>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show vanna

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-4229, inspect your installed packages using pip:

pip show vanna

Analyze the terminal output to locate any version of Vanna in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show vanna command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Vanna, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A flaw has been found in vanna-ai vanna up to 2.0.2. This impacts the function remove_training_data of the file src/vanna/legacy/google/bigquery_vector.py. This manipulation of the argument ID causes sql injection. The attack can be initiated remotely. The exploit has been published and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

CVE-2026-4229 Affected Vanna Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
vanna
PyPI
≤ 2.0.2

References

Frequently Asked Questions

What is CVE-2026-4229?
CVE-2026-4229 is a security vulnerability in Vanna involving Vanna has a SQL injection in the remove_training_data function under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Vanna versions are affected?
Affected versions include releases prior to current release patches across affected packages: vanna.
What version fixes CVE-2026-4229?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is vanna affected?
Yes, vanna is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-4229?
CVE-2026-4229 has a CVSS v3.1 base score of 7.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2026-4229?
CVE-2026-4229 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check PyPI dependencies for CVE-2026-4229?
Run the dependency tree command: 'pip show vanna'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6mj8-jmp2-g8q7",
  "modified" : "2026-03-17T20:32:43Z",
  "published" : "2026-03-16T15:30:46Z",
  "aliases" : [ "CVE-2026-4229" ],
  "summary" : "Vanna has a SQL injection in the remove_training_data function",
  "details" : "A flaw has been found in vanna-ai vanna up to 2.0.2. This impacts the function remove_training_data of the file src/vanna/legacy/google/bigquery_vector.py. This manipulation of the argument ID causes sql injection. The attack can be initiated remotely. The exploit has been published and may be used. The vendor was contacted early about this disclosure but did not respond in any way.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "vanna"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-4229"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/YLChen-007/b4f326eaecc29b192cf93dc5d6bc0623"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vanna-ai/vanna"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.351152"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.351152"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?submit.771214"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74", "CWE-89" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-17T20:32:43Z",
    "nvd_published_at" : "2026-03-16T14:20:16Z"
  }
}