@dynatrace-oss/dynatrace-mcp-server has a workflow template injection via create_workflow_for_notification
A template injection vulnerability in the create_workflow_for_notification tool lets a caller embed Jinja2 expressions that the Dynatrace workflow engine evaluates at runtime, exfiltrating event data to attacker-controlled destinations through a workflow that persists in the tenant after the MCP session ends.
The create_workflow_for_notification tool interpolates three caller-supplied parameters (teamName, problemType, channel) directly into a Dynatrace Workflow definition. Dynatrace Workflows use Jinja2 templating: per the [official documentation](https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/reference), {{ ... }} expressions in action inputs are evaluated at workflow runtime for every action except Run Javascript (which is carved out specifically to avoid code injection). A caller can therefore supply, for example, teamName = "{{ event() }}" and have the workflow engine evaluate that expression at runtime, serialising the full event object into the message body delivered to the Slack channel.
The vulnerable code is in src/capabilities/create-workflow-for-problem-notification.ts, lines 82-99:
```typescript
let notificationWorkflow: WorkflowCreate = {
title: [MCP POC] Notify team ${teamName} on problem of type ${problemType},
description: Automatically created workflow to notify team ${teamName} on problems of type ${problemType} - ...,
isPrivate: isPrivate,
type: 'SIMPLE',
tasks: {
send_notification: {
name: 'Send notification',
action: 'dynatrace.slack:slack-send-message',
description: 'Sends a notification to a Slack channel',
input: {
connectionId: 'slack-connection-id',
channel: {{ \"${channel}\" }}, // <-- channel sits inside {{ }}
message: 🚨 Alert for Team ${teamName}\n*Problem Type*: ${problemType}\n +
*Problem ID*: {{ event()["display_id"] }}\n*Status*: {{ event()["event.status"] }}\n +
<{{ environment().url }}/ui/apps/.../problem/{{ event()["event.id"] }}|Click here>,
},
active: true,
},
},
};
```
The action used is dynatrace.slack:slack-send-message, which is not in the documented Jinja-expression exception list. Its inputs are evaluated at workflow runtime.
The schema in src/index.ts:1052-1070 registers teamName, problemType, and channel as z.string().optional() with no pattern validation. The isPrivate parameter has .default(false), so created workflows are visible tenant-wide unless the caller explicitly sets it.
The approval prompt at src/index.ts:1069-1072:
```typescript
const approved = await requestHumanApproval(
Create a workflow for notifying team ${teamName} via ${channel} about ${problemType} problems,
);
```
Renders {{ event() }} literally to the operator with no indication that it will be templated, and does not surface the workflow's visibility.
The workflow is persistent: it remains in the tenant after the MCP session ends, after the operator's MCP credentials are revoked, and after the MCP server is uninstalled. It fires on every matching problem until manually deleted from the Workflows app. The channel parameter is uniquely dangerous because it is interpolated inside an existing {{ "..." }} expression context - close the string with " and you can run arbitrary Jinja expressions in the destination field itself.
Tested end-to-end against a real Dynatrace tenant. The MCP server was run in stdio mode with the operator's Platform Token. A tools/call create_workflow_for_notification was sent with:
```json
{
"teamName": "{{ event() }}",
"problemType": "ERROR",
"channel": "#mcp-sec-poc",
"isPrivate": true
}
```
The operator approved the prompt (which read: "Create a workflow for notifying team {{ event() }} via #mcp-sec-poc about ERROR problems"). The MCP returned a workflow ID. Fetching the stored workflow body via the Dynatrace Automation API (GET /platform/automation/v1/workflows/<id>) showed the injected expression stored verbatim:
```
title: "[MCP POC] Notify team {{ event() }} on problem of type ERROR"
message: "🚨 Alert for Team {{ event() }}\n*Problem Type*: ERROR\n*Problem ID*: {{ event()[\"display_id\"] }}\n..."
channel: '{{ "#mcp-sec-poc" }}'
action: "dynatrace.slack:slack-send-message"
```
The workflow was then triggered manually via the "Run workflow" feature in the Dynatrace Workflows app, with a synthetic event payload {"display_id":"P-123","event.status":"OPEN","event.id":"abc-123"}. The execution log for the send_notification task shows the workflow engine evaluated the injected expressions at runtime. The "Input" tab for the executed action contains:
```
channel: #mcp-sec-poc
message: Alert for Team
{'display_id': 'P-123',
'event.status': 'OPEN',
'event.id': 'a
This issue can be reached over the network, attack complexity is high, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality low, integrity low, availability none.
The score comes from this vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
GHSA-xrmj-5g4g-8987 is classified as CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine. The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when…
GHSA-xrmj-5g4g-8987 is recorded against 1 package.
Published on 31 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
github.com (Web)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
@dynatrace-oss/dynatrace-mcp-server has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) in other software:
Details
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| @dynatrace-oss/dynatrace-mcp-server | — | — |
References
Similar Threats
Free Vulnerability Check
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against GHSA-xrmj-5g4g-8987 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.