CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-XRMJ-5G4G-8987

GHSA-xrmj-5g4g-8987: Workflow Template Injection in @dynatrace-oss/dynatrace-mcp-server

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 31, 2026·5 min read·45 visits

Executive Summary (TL;DR)

The @dynatrace-oss/dynatrace-mcp-server before v2.0.0 allowed attackers to perform template injection into Dynatrace Workflow templates. This allows arbitrary Jinja2 template execution that persists on the tenant even after the session ends.

A template injection vulnerability in @dynatrace-oss/dynatrace-mcp-server allows untrusted input to be interpolated directly into Dynatrace Workflows using Jinja2 syntax, leading to persistent data exposure and exfiltration.

Vulnerability Overview

The Model Context Protocol (MCP) server for Dynatrace, distributed via the npm registry as @dynatrace-oss/dynatrace-mcp-server, acts as a bridge enabling Large Language Models (LLMs) to interact with Dynatrace APIs and perform automated operations.

One of the capabilities exposed by this MCP server is the create_workflow_for_notification tool. This tool allows users or automated agents to generate alert routing workflows inside a Dynatrace tenant, specifying details such as the target team, the class of problem, and the communication channel.

In versions of the server prior to 2.0.0, the tool accepts parameter inputs without proper validation or escaping, and interpolates them directly into a Dynatrace Workflow definition template. This workflow template utilizes the Jinja2 rendering engine at runtime, introducing a template injection surface (CWE-1336) that exposes the underlying Dynatrace tenant data to exfiltration.

Root Cause Analysis

The fundamental flaw resides within the handler implementation found at src/capabilities/create-workflow-for-problem-notification.ts. The handler accepts user-controlled properties, including teamName, problemType, and channel, via an incoming MCP JSON-RPC call.

These variables are processed as raw string variables and concatenated directly into the properties of a WorkflowCreate structure. Specifically, the channel parameter is wrapped in a Jinja2 execution syntax block: {{ "${channel}" }}. Because the implementation relies on simple ES6 template literals rather than structured, parameter-aware builders, characters like quotes and brackets remain intact.

Furthermore, the validation schema declared in src/index.ts relies on basic Zod string constraints (z.string().optional()) that enforce zero pattern verification or character blocklists. Consequently, any string containing template tags ({{ and }}) is parsed without validation, allowing the injection payload to reach the platform configuration unchanged.

Code & Architectural Analysis

An inspection of the vulnerable source code highlights how the payloads were constructed:

// Vulnerable: src/capabilities/create-workflow-for-problem-notification.ts
let notificationWorkflow: WorkflowCreate = {
  title: `[MCP POC] Notify team ${teamName} on problem of type ${problemType}`,
  description: `Automatically created workflow to notify team ${teamName}...`,
  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}" }}`,
        message: `🚨 Alert for Team ${teamName}\n*Problem Type*: ${problemType}\n` +
                 `*Problem ID*: {{ event()["display_id"] }}\n` +
                 `*Status*: {{ event()["event.status"] }}\n`
      },
      active: true,
    },
  },
};

The logical execution flow of this exploit moves from the user/agent interface to the internal templating engine as shown below:

The channel context is particularly vulnerable. By injecting #channel" }} into the parameter, an attacker breaks out of the string boundary defined in the generated template structure, giving them direct access to the outer Jinja2 processing context.

Exploitation Methodology & Proof of Concept

To execute this attack, a malicious actor must trigger the create_workflow_for_notification tool. This can occur either through direct administrative access to the MCP client interface or via an indirect prompt injection attack, where an LLM is manipulated into executing the tool on behalf of an operator.

A verified proof-of-concept payload submits the following arguments during the tool execution request:

{
  "teamName": "{{ event() }}",
  "problemType": "ERROR",
  "channel": "#mcp-sec-poc",
  "isPrivate": true
}

When this workflow is saved to the Dynatrace platform and subsequently triggered by an incident event, the underlying Jinja2 execution layer evaluates the payload. Instead of outputting the literal string {{ event() }}, the execution layer interprets the function call, which dumps the entire current event dictionary—including active operational data, status markers, and system metadata—into the outgoing communication block.

Architectural Impact & Persistence

The core risk of this vulnerability is the persistent execution state of Dynatrace workflows. Unlike typical web-application vulnerabilities where the exploitation lifecycle is ephemeral, a workflow template injection creates a long-lived configuration object within the tenant.

Once the workflow is saved, it continues to run within the Dynatrace platform infrastructure. It remains active even if the operator closes their session, has their personal access credentials revoked, or completely uninstalls the MCP server. This establishes a highly reliable and silent persistence channel.

Furthermore, because the templates run within the security context of the Dynatrace automation execution environment, they can access platform utility functions like environment(). An attacker can use this access to map out internal tenant URLs, architecture settings, and directory metadata, then exfiltrate this information through configured notification actions.

Remediation & Defensive Engineering

Rather than attempting to build sanitization routines to sanitize complex nested Jinja2 brackets, the development team decided to completely remove the vulnerable code path to eliminate the attack surface.

In version 2.0.0, both the create_workflow_for_notification and make_workflow_public tools were removed. Users needing workflow creation capabilities are instructed to use official channels, such as the dtctl command-line utility, the native Dynatrace User Interface, or the raw Dynatrace Automation API directly.

To remediate this vulnerability, operators must upgrade @dynatrace-oss/dynatrace-mcp-server to version 2.0.0 or higher. Note that upgrading the server does not purge previously generated workflows; an incident response audit must be executed inside the Dynatrace console to discover and manually delete any workflows created under the prefix [MCP POC].

Fix Analysis (1)

Technical Appendix

CVSS Score
4.2/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

Affected Systems

@dynatrace-oss/dynatrace-mcp-server

Affected Versions Detail

Product
Affected Versions
Fixed Version
@dynatrace-oss/dynatrace-mcp-server
Dynatrace
< 2.0.02.0.0
AttributeDetail
CWE IDCWE-1336
Attack VectorNetwork
CVSS v3.14.2
Exploit Statuspoc
KEV StatusNot Listed
Weakness NameImproper Neutralization of Special Elements Used in a Template Engine

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1546Event Triggered Execution
Persistence
CWE-1336
Improper Neutralization of Special Elements Used in a Template Engine

The product parses a template without properly neutralizing special elements, allowing attackers to execute arbitrary template code.

Known Exploits & Detection

GitHub Security AdvisoryVerified Proof of Concept via tool payload argument injection

Vulnerability Timeline

Advisory Published & Patch Released
2025-01-31

References & Sources

  • [1]GitHub Advisory Database
  • [2]Repository Security Advisory
  • [3]Patch Commit
  • [4]Pull Request #547
  • [5]Release Tag v2.0.0

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-28385
5.0

CVE-2026-28385: Server-Side Request Forgery in Canonical LXD Image Import

CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 2 hours ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
5 views•12 min read
•about 3 hours ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 4 hours ago•GHSA-FMC8-P6Q7-75CC
9.9

GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code Execution

GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 5 hours ago•GHSA-PJFF-C2WC-F6JM
9.9

CVE-2026-48769: Arbitrary File Write and Remote Code Execution via Trusted Image Hash in Canonical LXD and Linux Containers Incus

A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.

Alon Barad
Alon Barad
8 views•10 min read
•about 9 hours ago•CVE-2026-9639
6.5

CVE-2026-9639: Authenticated Denial of Service via Nil-Pointer Dereference in Canonical LXD Custom Volume Backup Import

CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.

Amit Schendel
Amit Schendel
7 views•9 min read