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`:...
Full CISO analysis pending enrichment.
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| @connorbritain/mssql-mcp-core | npm | <= 0.5.0 | 0.6.0 |
| @connorbritain/mssql-mcp-reader | npm | <= 0.4.2 | 0.5.0 |
| @connorbritain/mssql-mcp-server | npm | <= 0.5.2 | 0.6.0 |
| @connorbritain/mssql-mcp-writer | npm | <= 0.4.2 | 0.5.0 |
How severe is it?
What is the attack surface?
What should I do?
Patch available
Update @connorbritain/mssql-mcp-core to version 0.6.0
Update @connorbritain/mssql-mcp-reader to version 0.5.0
Update @connorbritain/mssql-mcp-server to version 0.6.0
Update @connorbritain/mssql-mcp-writer to version 0.5.0
Which compliance frameworks are affected?
Compliance analysis pending. Sign in for full compliance mapping when available.
Frequently Asked Questions
What is CVE-2026-63129?
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`: `tableName` and the free-form `whereClause` were interpolated raw. - `insert_data`: `tableName` and column names (object keys) were interpolated raw. - `execute_transaction`: the same raw `tableName`/`whereClause` interpolation per operation. - `create_table`, `create_index`, `drop_table`: table/column/index/schema identifiers were interpolated with no or insufficient validation. - `list_databases` (reader tier): the `stateFilter` argument 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 `whereClause` string 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_databases` validates `stateFilter` against 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.
Is CVE-2026-63129 actively exploited?
No confirmed active exploitation of CVE-2026-63129 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-63129?
Update to patched version: @connorbritain/mssql-mcp-core 0.6.0, @connorbritain/mssql-mcp-reader 0.5.0, @connorbritain/mssql-mcp-server 0.6.0, @connorbritain/mssql-mcp-writer 0.5.0.
What is the CVSS score for CVE-2026-63129?
CVE-2026-63129 has a CVSS v3.1 base score of 8.8 (HIGH).
What are the technical details?
Original Advisory
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`: `tableName` and the free-form `whereClause` were interpolated raw. - `insert_data`: `tableName` and column names (object keys) were interpolated raw. - `execute_transaction`: the same raw `tableName`/`whereClause` interpolation per operation. - `create_table`, `create_index`, `drop_table`: table/column/index/schema identifiers were interpolated with no or insufficient validation. - `list_databases` (reader tier): the `stateFilter` argument 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 `whereClause` string 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_databases` validates `stateFilter` against 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.
Weaknesses (CWE)
CWE-89 — Improper Neutralization of Special Elements used in an SQL Command: The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. For example, consider using persistence layers such as Hibernate or Enterprise Java Beans, which can provide significant protection against SQL injection if used properly.
- [Architecture and Design] If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated. Process SQL queries using prepared statements, parameterized queries, or stored procedures. These features should accept parameters or variables and support strong typing. Do not dynamically construct and execute query strings within these features using "exec" or similar functionality, since this may re-introduce the possibility of SQL injection. [REF-867]
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HReferences
- github.com/ConnorBritain/mssql-mcp-core/commit/227e2efc4e3311c477b7ae509c3ae15437a4f815
- github.com/ConnorBritain/mssql-mcp-core/commit/a9727f83768598e4fdbddfbc717ccfebb84ae7af
- github.com/ConnorBritain/mssql-mcp-core/pull/1
- github.com/ConnorBritain/mssql-mcp-core/security/advisories/GHSA-2m9m-6cr5-9x25
- github.com/advisories/GHSA-2m9m-6cr5-9x25
- nvd.nist.gov/vuln/detail/CVE-2026-63129