Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-2m9m-6cr5-9x25
Several tools in mssql-mcp-core built T-SQL by string-interpolating caller-supplied identifiers and predicates directly into the statement passed to the node-mssql Request.query() batch API. Only data values were parameterized.
Affected tools and inputs:
update_data,delete_data:tableNameand the free-formwhereClausewere interpolated raw.insert_data:tableNameand column names (object keys) were interpolated raw.execute_transaction: the same rawtableName/whereClauseinterpolation per operation.create_table,create_index,drop_table: table/column/index/schema identifiers were interpolated with no or insufficient validation.list_databases(reader tier): thestateFilterargument was interpolated 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 the row-count and preview queries run before the confirmUpdate/confirmDelete step, a malicious whereClause or tableName executed on the first call, bypassing the preview/confirmation and maxRows safety controls. Request.query() 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. Because list_databases is a read-only tool, the stateFilter sink makes the reader package injectable as well.
Impact
An actor who can supply tool arguments (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.
Patches
Fixed in @connorbritain/mssql-mcp-core 0.6.0:
- All identifiers are validated against a strict allowlist and bracket-quoted via a shared helper.
- The free-form
whereClausestring parameter is removed (breaking change) and replaced with structured, parameterized filters ({ column, operator, value }) using an operator allowlist. Values are always bound, never interpolated. list_databasesvalidatesstateFilteragainst a fixed allowlist before use.
Upgrade the consumer packages: mssql-mcp-reader 0.5.0, mssql-mcp-writer 0.5.0, mssql-mcp-server 0.6.0 (all depend on core ^0.6.0).
Workarounds
Upgrading is the only complete fix; the list_databases (stateFilter) sink is reachable even under READONLY=true and in the reader package. 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.
Upload your own SBOM in CycloneDX 1.6 or higher (JSON) directly here to check your vulnerabilities.
Drag and drop some file here, or click to select
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information. There is a high impact on the integrity of the data. There is a high impact on the availability of the system.
Exploitation activity has been observed. Apply available patches or mitigations urgently.
Probability that this vulnerability will be exploited in the wild within the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
- CVE-2026-63129Alias
- EUVD-2026-129174Alias
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard