CVE-2026-4229: Vanna SQL Injection Vulnerability
MODERATECVE-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.
CVE-2026-4229 at a Glance
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).
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.
pip install vanna>=Latest secure release
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
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?
Which Vanna versions are affected?
What version fixes CVE-2026-4229?
Is vanna affected?
What is the CVSS score of CVE-2026-4229?
What CWE is associated with CVE-2026-4229?
How can I check PyPI dependencies for CVE-2026-4229?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}