Skip to main content
Vulnerability Database/CVE-2026-89039

CVE-2026-89039: mcp-k6 Path Traversal Vulnerability

CVE-2026-89039 is a path traversal flaw in mcp-k6 that allows attackers to read sensitive files including SSH keys and cloud credentials. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-89039 Overview

CVE-2026-89039 is a path traversal vulnerability [CWE-22] in Grafana's mcp-k6 server. A caller who can invoke the convert_playwright_script prompt can pass a bare file path as the playwright_script argument. The server returns the contents of any file readable by the user running the process. Attackers can retrieve SSH keys, cloud credentials, and other sensitive files from the operator's home directory. The working-directory restriction applied to @-prefixed paths can be bypassed by placing a symbolic link inside the working directory that points outside it.

Critical Impact

Authenticated callers of the Model Context Protocol (MCP) server can read arbitrary files accessible to the service account, exposing secrets and credentials.

Affected Products

  • Grafana mcp-k6 server
  • Deployments exposing the convert_playwright_script prompt to callers
  • Environments where the server runs under a user account with access to secrets

Discovery Timeline

  • 2026-10-05 - CVE-2026-89039 published to the National Vulnerability Database (NVD)
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-89039

Vulnerability Analysis

The mcp-k6 server exposes a convert_playwright_script prompt that accepts a playwright_script argument. The server treats this argument as a file path and reads the referenced file before processing. The implementation does not restrict bare paths to the working directory. A caller can supply any absolute or relative path readable by the server process and receive its contents in the prompt response.

The server does apply a working-directory restriction to arguments prefixed with @. That control resolves paths lexically rather than following filesystem links. A symbolic link placed inside the working directory that targets a file outside it defeats the restriction. The server dereferences the link and reads the external target.

Root Cause

The root cause is improper limitation of a pathname to a restricted directory [CWE-22]. The prompt handler does not validate or canonicalize the playwright_script input against an allowlist of permitted paths. The partial allowlist that governs @ paths relies on string checks instead of resolving symbolic links before validation.

Attack Vector

An authenticated caller connects to the MCP server over the network. The attacker invokes convert_playwright_script with a target path such as /home/mcpuser/.ssh/id_rsa or /home/mcpuser/.aws/credentials. The server returns the file contents in its response. For paths behind the @ restriction, the attacker first stages a symlink inside the working directory and then references that symlink.

The vulnerability requires low privileges and no user interaction. See the Grafana Security Advisory CVE-2026-89039 for the vendor description.

Detection Methods for CVE-2026-89039

Indicators of Compromise

  • MCP prompt invocations where the playwright_script argument references absolute paths outside expected project directories.
  • Prompt arguments that resolve to sensitive files such as ~/.ssh/, ~/.aws/, ~/.config/, or /etc/.
  • Symbolic links created inside the mcp-k6 working directory that point to parent directories or user home paths.

Detection Strategies

  • Enable verbose logging on the mcp-k6 server and alert on convert_playwright_script calls whose arguments escape the project directory.
  • Correlate MCP server logs with filesystem audit events (auditd, Windows file auditing) targeting credential stores.
  • Review source code or configuration to confirm the version in use is patched before relying on runtime detection.

Monitoring Recommendations

  • Monitor read access on secret files owned by the service account using host-based telemetry.
  • Track creation of new symlinks inside the server's working directory, particularly links whose targets fall outside the project root.
  • Alert on outbound network transfers that follow anomalous MCP prompt invocations from the same session.

How to Mitigate CVE-2026-89039

Immediate Actions Required

  • Upgrade mcp-k6 to the fixed release listed in the Grafana advisory and restart the service.
  • Restrict access to the MCP server to trusted clients using network controls and authentication.
  • Rotate SSH keys, cloud credentials, and API tokens that were readable by the service account.

Patch Information

Grafana published remediation guidance in the Grafana Security Advisory CVE-2026-89039. Apply the fixed version before re-enabling the convert_playwright_script prompt.

Workarounds

  • Disable the convert_playwright_script prompt until the server is upgraded.
  • Run the mcp-k6 server under a dedicated low-privilege user whose home directory contains no secrets.
  • Remove any symbolic links from the working directory and prevent creation of new links through filesystem permissions.
  • Store SSH keys and cloud credentials outside the server account's reachable filesystem scope.
bash
# Configuration example
# Run mcp-k6 under a dedicated unprivileged account
sudo useradd --system --home /var/lib/mcp-k6 --shell /usr/sbin/nologin mcp-k6
sudo chown -R mcp-k6:mcp-k6 /var/lib/mcp-k6
sudo chmod 750 /var/lib/mcp-k6

# Prevent symlink traversal within the working directory
sudo mount -o bind,nosuid,nodev /var/lib/mcp-k6 /var/lib/mcp-k6
sudo sysctl -w fs.protected_symlinks=1

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.