Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ GHSA-xrmj-5g4g-8987 — dynatrace-mcp-server

⚪ Unknown ✅ No Known Exploit CWE-1336 OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

@dynatrace-oss/dynatrace-mcp-server has a workflow template injection via create_workflow_for_notification

Summary

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.

Details

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.

PoC

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

How this vulnerability can be exploited

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.

CVSS metrics in full

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

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: High — the attacker first has to win a race, learn a secret or otherwise prepare the target.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: Required — someone has to click, open or visit something.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: Low — limited, and the attacker does not choose what is affected.
  • Availability impact: None.

Weakness class

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…

Affected software

GHSA-xrmj-5g4g-8987 is recorded against 1 package.

  • @dynatrace-oss/dynatrace-mcp-server

Timeline and source

Published on 31 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)

Other advisories for this package

@dynatrace-oss/dynatrace-mcp-server has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) in other software:

Details

Severity Unknown
CVSS Score N/A
CVSS Vector CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
CWE CWE-1336
Public Exploit ✅ No
Source OSV
Published 2026-07-31
Updated 2026-08-20
Modified 2026-07-31
Fix URL N/A

Affected Packages

Software From version Fixed in
@dynatrace-oss/dynatrace-mcp-server — —

Free Vulnerability Check

Is your site affected by GHSA-xrmj-5g4g-8987?

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.

Browse related advisories

All advisoriesGitHub AdvisoryGitHub Advisory Undated
✓