@DYNATRACE-OSS/DYNATRACE-MCP-SERVER · CVE-2026-123810 · AI agents & MCP
FIX → 2.1.1
Several read tools in the Dynatrace MCP server paste caller-supplied parameters straight into DQL queries without escaping. A caller, often an LLM steered by prompt injection, can break out of the query and bypass field selection, time windows and display caps.
first public Jul 31, 2026 · 1 source
Could this affect your app?
Free first check from your website. Connect your repo for the full answer.
Teams that run the Dynatrace MCP server so an AI agent can query their Dynatrace tenant are exposed, especially if an LLM reads untrusted input and its MCP client auto-approves tools marked read-only. The sources say the attacker gains no data beyond what the token's execute_dql tool already grants, so the impact is mainly the broken read-only contract. Teams not using this MCP server can skip it.
Not affected if not-using-mcp-server, version-2.1.1-or-later
Who cares ai-agents, dynatrace, mcp, npm
npm ls @dynatrace-oss/dynatrace-mcp-server2.1.1 are affected per the product data.Upgrade to 2.1.1
@dynatrace-oss/dynatrace-mcp-server: move to 2.1.1A DQL injection vulnerability in several read tools lets a caller bypass the tools' documented field-scope, time-window, and display caps by injecting DQL pipeline stages through parameters typed as identifiers.
Several tools interpolate caller-supplied parameters directly into DQL query strings without quoting or escaping. The affected parameters are documented in their Zod schemas as identifiers or constrained shorthand (such as "24h" timeframe values or Kubernetes UIDs) - not as DQL expressions. The interpolation lets a caller break out of string literals, append arbitrary DQL pipeline stages, and use // line comments (documented in the Dynatrace DQL language reference) to discard the rest of the intended query.
The marginal-privilege ceiling is low because the operator's token also exposes execute_dql with full DQL access. What the injection grants is the ability to bypass the affected tools' contract: the readOnlyHint: true annotation that MCP clients may treat as a signal to auto-approve, the per-tool field selection (e.g., | fields id, name, type), the display caps (maxProblemsToDisplay, maxVulnerabilitiesToDisplay, ), and the time-window bounds.
Check it with your coding agent
It reads this page and tells you if your code is affected.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
maxEntitiesToDisplayThe vulnerable interpolations are:
| File | Line | Parameter | Interpolation |
|---|---|---|---|
src/capabilities/find-monitored-entity-by-name.ts | 23 | entityNames[] | `fetch ${entityType} | search "*${entityNames.join('*" OR "*')}*" | fieldsAdd entity.type | expand tags` |
src/capabilities/find-monitored-entity-by-name.ts | 41 | entityNames[] | `smartscapeNodes "*" | search "*${entityNames.join('*" OR "*')}*" | fields id, name, type` |
src/capabilities/list-problems.ts | 27 | timeframe | `fetch dt.davis.problems, from: now()-${timeframe}, to: now()` |
src/capabilities/list-vulnerabilities.ts | 19 | timeframe | `fetch security.events, from: now()-${timeframe}, to: now()` |
src/capabilities/list-exceptions.ts | 11 | timeframe | `fetch user.events, from: now()-${timeframe}, to: now()` |
src/capabilities/get-events-for-cluster.ts | 20 | timeframe | `fetch events, from: now()-${timeframe}, to: now()` |
src/capabilities/get-events-for-cluster.ts | 27 | clusterId, kubernetesEntityId | `| filter k8s.cluster.uid == "${clusterId}" or dt.entity.kubernetes_cluster == "${kubernetesEntityId}"` |
All Zod schemas for these parameters use z.string() or z.array(z.string()) with no pattern validation.
clusterId - quote-and-comment break-out. With clusterId = 'x" or 1==1 //' the constructed query becomes:
| filter k8s.cluster.uid == "x" or 1==1 //" or dt.entity.kubernetes_cluster == ""
The first " closes the string literal, or 1==1 neutralises the filter to match every row, and // discards the rest of the line including the kubernetesEntityId guard.
entityNames - pipeline-stage injection. With entityNames = ['svc" | fields id, name, tags //'] the constructed smartscape query becomes:
smartscapeNodes "*" | search "*svc" | fields id, name, tags //*" | fields id, name, type
After the // line comment, the effective query is smartscapeNodes "*" | search "*svc" | fields id, name, tags. The original | fields id, name, type stage is suppressed and replaced with the attacker's field selection - the tool returns whatever field set the attacker requests (including ones not in the tool's documented output contract).
timeframe - prefix injection. With timeframe = '30d, to: now() | fieldsAdd internal_secret //' the list-problems query becomes:
fetch dt.davis.problems, from: now()-30d, to: now() | fieldsAdd internal_secret //, to: now()
| filter isNull(dt.davis.is_duplicate) OR not(dt.davis.is_duplicate)
...
A new pipeline stage is injected before the tool's intended | filter, and the rest of the query is commented out.
The server's own verify_dql tool can be used to confirm any specific injection payload parses as valid DQL.
readOnlyHint: true, which some MCP clients treat as a signal to auto-approve. The injection turns a "safe" read tool into an arbitrary-DQL surface.execute_dql already provides - the marginal impact is the auto-approval pathway and the broken tool contract, not privilege escalation.This page as .md · .json · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.