Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | The risk assessment reveals a concerning mismatch between CVSS metrics and real-world exploitability. The CVSS 3.1 score of 6.3 indicates medium severity with a network attack vector (AV:N), low attack complexity (AC:L), and requirement for low-level privileges (PR:L), suggesting accessibility from remote, authenticated users. The CVSS vector also indicates low confidentiality, integrity, and availability impact (C:L/I:L/A:L), which understates the actual risk since successful code injection can lead to full remote code execution. The EPSS vector tag includes 'E:P', indicating a public exploit is available, and 'RC:R', indicating reproducible proof of concept. The combination of network accessibility, low complexity, public POC availability, vendor non-responsiveness, and confirmed code injection capabilities elevates this to a critical operational risk despite the medium CVSS score. The presence of a public exploit on GitHub (Ka7arotto/cve repository) means the barrier to exploitation is minimal, making this a high-priority threat for any organization running MindSQL in production, particularly those exposing it through web interfaces or APIs. |
| Exploit ScenarioDerived | An authenticated user with legitimate access to a MindSQL deployment sends a crafted natural language query containing embedded Python or SQL code through the ask_db function. Due to insufficient input validation, the injected code is executed by the MindSQL process on the backend server. A public proof-of-concept exploit (available on GitHub) demonstrates this technique, allowing an attacker to read sensitive files, modify database records, or establish a reverse shell for persistent access. The low attack complexity and network accessibility mean an attacker only needs valid credentials to execute the attack, and the availability of public POC code reduces the technical skill required significantly. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 20, 2026
A code injection vulnerability exists in Mindinventory MindSQL up to version 0.2.1 that allows remote code execution through manipulation of the ask_db function in mindsql/core/mindsql_core.py. An authenticated attacker can exploit this vulnerability to execute arbitrary code on the affected system. A public proof-of-concept exploit is available, and the vendor has not responded to early disclosure attempts, increasing the likelihood of active exploitation.
RemediationAI
Immediately upgrade Mindinventory MindSQL to a patched version beyond 0.2.1 if available; however, given vendor non-responsiveness, users should verify patch availability through the official GitHub repository or contact Mindinventory directly for a security update timeline. If upgrading is not immediately possible, implement the following mitigations: restrict network access to MindSQL instances to trusted IP ranges only, disable or restrict the ask_db function if not actively required, run MindSQL in an isolated container or virtual machine with minimal privileges, implement input validation and sanitization at the application layer before passing data to ask_db (though this is not a substitute for a vendor patch), and monitor execution logs for suspicious ask_db invocations. Additionally, authenticate all requests with strong credentials since the vulnerability requires PR:L (low privilege level), and consider implementing Web Application Firewall (WAF) rules to detect and block code injection patterns targeting the ask_db endpoint.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
MindSQL is a Python-based library designed to facilitate natural language database queries through AI-driven SQL generation. The vulnerability resides in the ask_db function, which processes user input to generate and execute SQL queries. The root cause is classified under CWE-94 (Improper Control of Generation of Code), indicating that the application fails to properly sanitize or validate user-supplied input before passing it to code execution mechanisms. The affected CPE is cpe:2.3:a:mindinventory:mindsql:*:*:*:*:*:*:*:*, indicating all versions up to 0.2.1 are vulnerable. The code injection occurs at the interface between natural language input processing and SQL/code generation, where insufficient input validation allows attackers to inject arbitrary Python or SQL code that executes with the privileges of the MindSQL process.
Know when Mindsql gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
5DescriptionCVE.org
A vulnerability was found in Mindinventory MindSQL up to 0.2.1. Impacted is the function ask_db of the file mindsql/core/mindsql_core.py. Performing a manipulation results in code injection. The attack can be initiated remotely. The exploit has been made public and could be used. The vendor was contacted early about this disclosure but did not respond in any way.
Executive ViewAI
Organizations using Mindinventory MindSQL should be aware of moderate risk from CVE-2026-4506, a code injection vulnerability rated CVSS 6.3. Exploitation could allow attackers to execute code or inject malicious input. Proof-of-concept code is publicly available. Organizations should apply vendor updates when available and monitor for exploitation.
Apply vendor patch. If patching is delayed: deploy WAF rules, restrict network access, enable logging.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-13832
GHSA-m6m4-34cj-4hh7
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB