{"vuln_id":"GHSA-2m9m-6cr5-9x25","aliases":["CVE-2026-63129"],"description":"mssql-mcp-core: SQL injection in mssql-mcp write tools via unparameterized table names and WHERE clauses","published_at":"2026-11-19T00:46:38Z","modified_at":"2026-11-19T00:46:41Z","first_seen_at":"2026-11-21T19:15:19.494667Z","severity":"high","severity_source":"ghsa","cvss_score":8.8,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","cwe":["CWE-89"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-2m9m-6cr5-9x25"},"matched_alias":null,"items":[{"id":2421,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-2m9m-6cr5-9x25 / CVE-2026-63129: mssql-mcp-core: SQL injection in mssql-mcp write tools via unparameterized table names and WHERE clauses","summary":"mssql-mcp-core: SQL injection in mssql-mcp write tools via unparameterized table names and WHERE clauses\n\nSeveral 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.\n\nAffected tools and inputs:\n- `update_data`, `delete_data`: `tableName` and the free-form `whereClause` were interpolated raw.\n- `insert_data`: `tableName` and column names (object keys) were interpolated raw.\n- `execute_transaction`: the same raw `tableName`/`whereClause` interpolation per operation.\n- `create_table`, `create_index`, `drop_table`: table/column/index/schema identifiers were interpolated with no or insufficient validation.\n- `list_databases` (reader tier): the `stateFilter` argument was interpolated raw into the query, with only a non-enforced inputSchema enum guarding it.\n\nThe 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.\n\n## Impact\n\nAn 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.\n\n## Patches\n\nFixed in `@connorbritain/mssql-mcp-core` 0.6.0:\n- All identifiers are validated against a strict allowlist and bracket-quoted via a shared helper.\n- 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.\n- `list_databases` validates `stateFilter` against a fixed allowlist before use.\n\nUpgrade 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`).\n\n## Workarounds\n\nUpgrading 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.\n\nAffected packages: npm:@connorbritain/mssql-mcp-core, npm:@connorbritain/mssql-mcp-reader, npm:@connorbritain/mssql-mcp-server, npm:@connorbritain/mssql-mcp-writer\nPatched: @connorbritain/mssql-mcp-core 0.6.0, @connorbritain/mssql-mcp-reader 0.5.0, @connorbritain/mssql-mcp-writer 0.5.0, @connorbritain/mssql-mcp-server 0.6.0","url":"https://github.com/advisories/GHSA-2m9m-6cr5-9x25","published_at":"2026-11-19T00:46:38Z","updated_at":"2026-11-19T00:46:41Z","fetched_at":"2026-11-21T19:15:18.416823Z","severity":"high","cvss_score":8.8,"epss":0.00553,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"@connorbritain/mssql-mcp-core","vuln_id":"CVE-2026-63129","vuln_ids":["CVE-2026-63129","GHSA-2M9M-6CR5-9X25"],"tags":["ghsa","npm","CWE-89"],"cluster_id":2274,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2421","html":"https://vulnwatch.ve1ve2.com/item/2421"}},{"id":8174,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-63129: mssql-mcp-core is the shared library that powers MSSQL MCP servers. Prior to core and server 0.6.0 and reader and writer 0.5.0, multiple database tools interpo…","summary":"mssql-mcp-core is the shared library that powers MSSQL MCP servers. Prior to core and server 0.6.0 and reader and writer 0.5.0, multiple database tools interpolate caller-controlled identifiers and predicates into T-SQL batches passed to Request.query() while parameterizing only data values. update_data, delete_data, insert_data, execute_transaction, create_table, create_index, and drop_table accept unsafe tableName, column, index, schema, or free-form whereClause input, while reader-tier list_databases interpolates stateFilter without runtime allowlist enforcement. Row-count and preview queries execute before confirmUpdate or confirmDelete, allowing malicious arguments to bypass confirmation and maxRows controls and execute stacked DDL or DML, read or destroy data, and potentially run operating-system commands when the SQL login is privileged and xp_cmdshell is enabled. This issue is fixed in core and server version 0.6.0 and reader and writer version 0.5.0.\n\nReferences:\nhttps://github.com/ConnorBritain/mssql-mcp-core/commit/227e2efc4e3311c477b7ae509c3ae15437a4f815\nhttps://github.com/ConnorBritain/mssql-mcp-core/commit/a9727f83768598e4fdbddfbc717ccfebb84ae7af\nhttps://github.com/ConnorBritain/mssql-mcp-core/pull/1\nhttps://github.com/ConnorBritain/mssql-mcp-core/security/advisories/GHSA-2m9m-6cr5-9x25","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63129","published_at":"2026-11-18T20:19:10.557000Z","updated_at":"2026-11-18T20:19:10.557000Z","fetched_at":"2026-11-21T19:15:31.483973Z","severity":"high","cvss_score":8.8,"epss":0.00553,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-63129","vuln_ids":["CVE-2026-63129","GHSA-2M9M-6CR5-9X25"],"tags":["CWE-89"],"cluster_id":2275,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/8174","html":"https://vulnwatch.ve1ve2.com/item/8174"}}]}