DEV Community

CVE Reports
CVE Reports

Posted on Originally published at cvereports.com

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

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

Vulnerability ID: CVE-2026-63129
CVSS Score: 8.8
Published: 2026-11-19

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.

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.


⚠️ Exploit Status: POC

Technical Details

  • Vulnerability Type: CWE-89: SQL Injection
  • CVSS v3.1 Score: 8.8 High (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
  • Attack Vector: Network (MCP JSON-RPC Tool Invocations)
  • Affected Component: @connorbritain/mssql-mcp-core (< 0.6.0) & downstream servers
  • Security Control Bypass: Pre-confirmation row count query executes before confirmUpdate/confirmDelete gates
  • Impact: Arbitrary stacked T-SQL execution, data exfiltration/destruction, potential RCE via xp_cmdshell
  • Exploit Status: Proof-of-Concept (Documented in repository test suites)
  • CISA KEV Status: Not Listed

Affected Systems

  • @connorbritain/mssql-mcp-core
  • mssql-mcp-server
  • mssql-mcp-reader
  • mssql-mcp-writer
  • @connorbritain/mssql-mcp-core: < 0.6.0 (Fixed in: 0.6.0)
  • mssql-mcp-server: < 0.6.0 (Fixed in: 0.6.0)
  • mssql-mcp-reader: < 0.5.0 (Fixed in: 0.5.0)
  • mssql-mcp-writer: < 0.5.0 (Fixed in: 0.5.0)

Code Analysis

Commit: 227e2ef

Fixes SQL injection in write, DDL, and transaction tools by introducing sqlIdentifier quoting and parameterized whereFilter compilation.

Commit: a9727f8

Fixes SQL injection in list_databases stateFilter parameter by adding runtime allowlist validation.

Mitigation Strategies

  • Upgrade @connorbritain/mssql-mcp-core and mssql-mcp-server to version 0.6.0 or higher, and mssql-mcp-reader / mssql-mcp-writer to version 0.5.0 or higher.
  • Migrate all MCP tool consumers and prompt definitions from free-form whereClause strings to structured FilterCondition arrays.
  • Enforce least-privilege database credentials for MCP server connections instead of relying solely on application-tier read/write mode toggles.
  • Disable dangerous MSSQL extended stored procedures including xp_cmdshell and sp_OACreate on database instances accessible to MCP servers.

Remediation Steps:

  1. Run npm install @connorbritain/mssql-mcp-core@^0.6.0 or update global/local installations of mssql-mcp-server@0.6.0, mssql-mcp-reader@0.5.0, and mssql-mcp-writer@0.5.0.
  2. Audit client code and agent system prompts for usages of whereClause in update_data, delete_data, and execute_transaction tools, replacing them with the structured filters parameter.
  3. Verify that the MSSQL login configured in the MCP server environment variables holds only the minimum required table-level SELECT, INSERT, UPDATE, or DELETE grants.
  4. Restart all running MCP server processes and connected LLM client sessions (e.g., Claude Desktop or custom agent workers) to load the patched tool definitions.

References


Read the full report for CVE-2026-63129 on our website for more details including interactive diagrams and full exploit analysis.

Top comments (0)