CVE-2026-63129: SQL injection in mssql-mcp-core lets AI agents run arbitrary T-SQL on Microsoft SQL Server

A high-severity SQL injection vulnerability in mssql-mcp-core allows malicious AI agents or compromised MCP clients to execute arbitrary T-SQL commands on Microsoft SQL Server databases, bypassing safety controls and potentially achieving OS command execution.

Christopher Ort
By i10X News Desk · Reviewed by Christopher Ort · 3 min read
Share
A developer's hands typing at a laptop keyboard with database schema diagrams and SQL query windows visible on the screen in a dimly lit office
Image: AI-generated, i10X
On this page
  1. Quick Take
  2. In plain English
  3. What happened
  4. What you should do
  5. What it means
  6. Sources
i10X Quick Take

Quick Take

  1. What: SQL injection vulnerability (CVE-2026-63129, CVSS 8.8) in mssql-mcp-core, the shared library powering MSSQL MCP servers, allows AI agents to execute arbitrary T-SQL commands
  2. Who is affected: Users of mssql-mcp-core versions before 0.6.0, mssql-mcp-server before 0.6.0, and mssql-mcp-reader and mssql-mcp-writer before 0.5.0
  3. Attack vector: Malicious or compromised MCP clients, or LLM agents steered via indirect prompt injection, can supply crafted tool arguments to read, modify, or drop arbitrary data
  4. Bypass: Attackers can bypass preview, confirmation, and maxRows safety controls because vulnerable queries execute before these safeguards
  5. What to do: Upgrade to mssql-mcp-core 0.6.0, mssql-mcp-server 0.6.0, or mssql-mcp-reader and mssql-mcp-writer 0.5.0

In plain English

mssql-mcp-core is a tool that connects AI assistants to Microsoft SQL Server databases so they can read and change data. A bug let anyone who could feed the AI instructions, directly or by hiding them in documents it reads, slip their own database commands into the tool, skipping its safety checks. That could be used to read or delete data, and on badly configured servers even to run system commands. The fix is in mssql-mcp-core and mssql-mcp-server 0.6.0 and in the reader and writer packages 0.5.0.

What you should do: If you use these tools, update now; if not, you do not need to do anything.

What happened

Multiple database tools in mssql-mcp-core interpolated caller-controlled identifiers and predicates directly into T-SQL batches passed to the node-mssql Request.query() API while parameterizing only data values. The affected tools include update_data, delete_data, insert_data, execute_transaction, create_table, create_index, drop_table, and list_databases.

The update_data and delete_data tools accepted unsafe tableName and free-form whereClause input that was interpolated raw into SQL queries. The insert_data tool interpolated tableName and column names (object keys) without sanitization. The execute_transaction tool applied the same raw tableName and whereClause interpolation per operation. The create_table, create_index, and drop_table tools interpolated table, column, index, and schema identifiers with no or insufficient validation.

The list_databases tool in the reader tier interpolated the stateFilter argument raw into the query, with only a non-enforced inputSchema enum guarding it. The only check on whereClause was that it was non-empty.

Because row-count and preview queries execute before the confirmUpdate or confirmDelete step, a malicious whereClause or tableName executed on the first call, bypassing the preview, confirmation, and maxRows safety controls. The Request.query() method submits a multi-statement T-SQL batch, so a crafted input enabled stacked statements (arbitrary DDL/DML), sub-selects, and (with a privileged login and xp_cmdshell enabled) OS command execution.

An actor who can supply tool arguments, such as a malicious or compromised MCP client or an LLM agent steered via indirect prompt injection, could read, modify, or drop arbitrary data, bypass the read_data allow/deny validation and the preview/confirmation/maxRows safeguards, and conditionally achieve OS command execution.

The vulnerability is tracked as CVE-2026-63129 with a CVSS score of 8.8 (high severity). It is classified as CWE-89 (Improper Neutralization of Special Elements used in an SQL Command).

What you should do

Upgrade to the patched versions immediately. Install mssql-mcp-core 0.6.0, mssql-mcp-server 0.6.0, or mssql-mcp-reader and mssql-mcp-writer 0.5.0. All consumer packages now depend on core ^0.6.0.

Upgrading is the only complete fix. The list_databases (stateFilter) sink is reachable even under READONLY=true and in the reader package, so no workaround provides full protection.

As defense in depth, run the server under a least-privilege SQL login with xp_cmdshell disabled, and restrict which MCP clients can invoke the tools.

What it means

The vulnerability demonstrates the security risks of AI agent tool frameworks that construct database queries by string interpolation rather than parameterization. The flaw allowed attackers to bypass multiple layers of safety controls (preview, confirmation, row limits) because the vulnerable queries executed before those safeguards could intervene.

The fix in version 0.6.0 validates all identifiers against a strict allowlist and bracket-quotes them via a shared helper. The free-form whereClause string parameter is removed (a breaking change) and replaced with structured, parameterized filters ({ column, operator, value }) using an operator allowlist. Values are always bound, never interpolated. The list_databases tool validates stateFilter against a fixed allowlist before use.

The vulnerability was discovered by security researchers novice-22 and m10x and disclosed through GitHub’s security advisory process.

Database MCP servers keep failing in similar ways: see our reports on the pgEdge Postgres MCP Server SQL injection and the pgEdge write confirmation bypass. New cases are tracked in our AI Security hub.

Sources

  • NVD CVE-2026-63129
  • GitHub Advisory GHSA-2m9m-6cr5-9×25
Christopher Ort

Christopher Ort

Christopher Ort is the editor of i10X News at i10x.ai. He has worked hands-on with AI tools, models and agent workflows for years and leads i10X’s coverage of AI launches, funding and research. He is the author of “The Style Penalty”, an SSRN study on how frontier AI models judge AI-written CVs, covered by heise online and t3n.

Editor's picks

  1. Georgia Tech’s Academic AI Playbook: 20 Lessons From 67 Real Courses, Free to Reuse
  2. Arcfront’s $1B Run Rate: What the AI Data Startup Confirms and What It Doesn’t
  3. GPT-6.2 Astra Tops Blueprint-Bench 2, 70% Above May Leader GPT-5.5
  4. Deutsche Telekom Puts 100 Million Euros Into Mistral for Sovereign AI in Germany
  5. Inkling 2 Mini: Thinking Machines’ Looped Open Model Tops Qwen on Coding Tests