GHSA-2m9m-6cr5-9x25: mssql-mcp-core: SQL injection in mssql-mcp write tools via unparameterized table names and WHERE clauses
- Identifiers
- CVE-2026-63129GHSA-2m9m-6cr5-9x25
- Published
- Record updated
- Affected
- @connorbritain/mssql-mcp-server <= 0.5.2, fixed in 0.6.0, released June 29, 2026, 143 days before disclosure
- @connorbritain/mssql-mcp-writer <= 0.4.2, fixed in 0.5.0, released June 29, 2026, 143 days before disclosure
- @connorbritain/mssql-mcp-reader <= 0.4.2, fixed in 0.5.0, released June 29, 2026, 143 days before disclosure
- and 1 more
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
Summary
Several tools in `mssql-mcp-core` built T-SQL by string-interpolating caller-supplied identifiers and `whereClause` predicates into `Request.query()` batches, with only data values parameterized. Because preview queries ran before the `confirmUpdate`/`confirmDelete` step, a crafted input executed on the first call and bypassed the preview, confirmation and `maxRows` safeguards. An actor supplying tool arguments could read, modify or drop data and, under a privileged login with `xp_cmdshell` enabled, conditionally execute OS commands.
Mitigation
Fixed in `@connorbritain/mssql-mcp-core` 0.6.0: identifiers are validated against a strict allowlist and bracket-quoted, the free-form `whereClause` is removed (breaking change) in favor of parameterized `{ column, operator, value }` filters with an operator allowlist, and `list_databases` validates `stateFilter` against a fixed allowlist. Upgrade `mssql-mcp-reader` 0.5.0, `mssql-mcp-writer` 0.5.0 and `mssql-mcp-server` 0.6.0. Workaround: run the server under a least-privilege SQL login with `xp_cmdshell` disabled and restrict which MCP clients can invoke the tools.
Related items
- HighCVE-2026-77283: obsidian-sync-mcp HTTP /mcp endpoint DNS rebinding and cross-origin vault accessSimilar attack · NVD/CVE Database
- HighCVE-2026-75612: yt-mcp arbitrary file read through add_attachment file_pathSimilar attack · NVD/CVE Database
- MediumCVE-2026-75518: DOMShell MCP server eval tool bypasses write permission checksSimilar attack · NVD/CVE Database
- HighCVE-2026-62964: Gortex arbitrary file write through MCP file toolsSimilar attack · NVD/CVE Database
- HighCVE-2026-127222: SGLang missing authorization on POST /load_lora_adapter_from_tensorsSimilar attack · NVD/CVE Database