GHSA-2M9M-6CR5-9X25
Vulnerability from github – Published: 2026-11-19 00:46 – Updated: 2026-11-19 00:46Several 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.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.5.0"
},
"package": {
"ecosystem": "npm",
"name": "@connorbritain/mssql-mcp-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.6.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.4.2"
},
"package": {
"ecosystem": "npm",
"name": "@connorbritain/mssql-mcp-reader"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.5.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.4.2"
},
"package": {
"ecosystem": "npm",
"name": "@connorbritain/mssql-mcp-writer"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.5.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.5.2"
},
"package": {
"ecosystem": "npm",
"name": "@connorbritain/mssql-mcp-server"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.6.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-63129"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-19T00:46:38Z",
"nvd_published_at": "2026-11-18T20:19:10Z",
"severity": "HIGH"
},
"details": "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.\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.",
"id": "GHSA-2m9m-6cr5-9x25",
"modified": "2026-11-19T00:46:38Z",
"published": "2026-11-19T00:46:38Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/ConnorBritain/mssql-mcp-core/security/advisories/GHSA-2m9m-6cr5-9x25"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-63129"
},
{
"type": "WEB",
"url": "https://github.com/ConnorBritain/mssql-mcp-core/pull/1"
},
{
"type": "WEB",
"url": "https://github.com/ConnorBritain/mssql-mcp-core/commit/227e2efc4e3311c477b7ae509c3ae15437a4f815"
},
{
"type": "WEB",
"url": "https://github.com/ConnorBritain/mssql-mcp-core/commit/a9727f83768598e4fdbddfbc717ccfebb84ae7af"
},
{
"type": "PACKAGE",
"url": "https://github.com/ConnorBritain/mssql-mcp-core"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "mssql-mcp-core: SQL injection in mssql-mcp write tools via unparameterized table names and WHERE clauses"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.