Skip to content

H3-2026-1042

MCP Server for Kubernetes Arbitrary File Read Vulnerability

Category VULNERABILITY
Base Score 7.5

Description

Suyogs mcp-server-kubernetes exposes a kubectl_apply tool whose filename parameter is passed directly to kubectl's file flag without restriction when the server is reachable over a remote transport such as SSE or Streamable HTTP. Remote attackers can supply an arbitrary path on the server host, causing kubectl to open and parse that file as a manifest. When the file is not valid Kubernetes YAML, kubectl's parse error echoes surrounding file content back through the tool call response, disclosing the file's contents. Exploitation requires network reachability to the MCP server's remote transport endpoint.

Impact

Remote attackers read arbitrary files from the MCP server host, including Kubernetes service account tokens and kubeconfig files. This can lead directly to credential theft and compromise of the Kubernetes cluster the server manages. Organizations exposing this MCP server over a remote transport face cluster wide compromise risk.

References