adx-mcp-server KQL Injection via table_name Parameter (CVE-2026-33980)
by romain-deperne · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-33980
- Category
- web
- Affected product
- adx-mcp-server (pab1it0/adx-mcp-server)
- Affected versions
- <= 0.1.0 (commit 48b2933)
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Tags
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-04 |
| Author / Researcher | romain-deperne |
| CVE / Advisory | CVE-2026-33980 |
| Category | web |
| Severity | High |
| CVSS Score | 8.8 |
| Status | PoC |
| Tags | mcp, kql-injection, azure-data-explorer, ai-agent, prompt-injection, cwe-943, data-exfiltration |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | adx-mcp-server (pab1it0/adx-mcp-server) |
| Versions Affected | <= 0.1.0 (commit 48b2933) |
| Language / Platform | Python MCP server wrapping Azure Data Explorer (Kusto) |
| Authentication Required | No (any MCP client/tool caller) |
| Network Access Required | Yes (MCP tool invocation, typically local or agent-mediated) |
Summary
adx-mcp-server is a Model Context Protocol server that exposes tools letting an AI agent query an Azure Data Explorer (Kusto/KQL) cluster. Three “safe” metadata tools — get_table_schema, sample_table_data, and get_table_details — build their KQL queries by directly interpolating the attacker- or agent-controlled table_name argument into an f-string, with no validation or escaping. Because KQL supports the | pipe operator and // line comments, an attacker can inject arbitrary query operators or comment out the rest of the intended query. This is especially dangerous because MCP clients often auto-approve these “read-only” metadata tools while requiring explicit confirmation for the raw execute_query tool, so the injection silently bypasses that trust boundary. The PoC script demonstrates crafting table_name values that read arbitrary tables/columns and that chain a destructive .drop table management command.
Vulnerability Details
Root Cause
table_name is interpolated unsanitized into KQL query strings (e.g. f"{table_name} | getschema", f".show table {table_name} details") before being passed to client.execute(), allowing injection of pipe operators, comments, and management commands.
Attack Vector
- Attacker (or a prompt-injected AI agent processing untrusted data) calls the
get_table_schema,sample_table_data, orget_table_detailsMCP tool. - The
table_nameargument is set to a value such as"sensitive_data | project Secret, Password | take 100 //", using//to comment out the rest of the original query. - The server executes the resulting KQL query as-is against the Azure Data Explorer cluster.
- For
get_table_details, a newline-injected value can additionally chain a.drop tablemanagement command.
Impact
Unauthorized read access to any table/column in the ADX database, plus the ability to run destructive management commands (.drop table, .drop extents), all through tools an MCP client would normally treat as low-risk and auto-approve.
Environment / Lab Setup
Target: adx-mcp-server <= 0.1.0 connected to an Azure Data Explorer cluster
Attacker: Python 3 (to inspect/run poc.py demonstration payloads); an MCP client capable of issuing tool calls
Proof of Concept
PoC Script
See
poc.pyin this folder.
| |
The script prints the malicious table_name values for each of the three vulnerable tools, shows the resulting injected KQL query string, and prints the corresponding MCP tools/call JSON payloads that would trigger data exfiltration or a destructive .drop table command when sent to a live adx-mcp-server instance.
Detection & Indicators of Compromise
Signs of compromise:
- KQL audit logs showing queries with pipe/comment sequences not matching the intended metadata operation
- Unexpected
.drop table/.drop extentsmanagement commands originating from MCP tool traffic - MCP tool-call logs where
table_namearguments contain query operators instead of a plain table identifier
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 — monitor for advisory |
| Interim mitigation | Validate table_name against a strict allowlist (alphanumeric/underscore table identifiers only) before interpolation; reject values containing ` |
References
Notes
Mirrored from https://github.com/romain-deperne/CVE-2026-33980 on 2026-07-05.
| |