Skip to content

← Public intelligence

npm package

mcp-server-kubernetes

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

6 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Critical, CVSS 9.3npmAmendedPublished

    mcp-server-kubernetes argument injection can expose Kubernetes cluster credentials

    CVE-2026-61459 · GHSA-wmg3-h8mf-wgvr

    Affected
    • npm mcp-server-kubernetes < 3.9.0
    Fixed in
    3.9.0· Vendor fix available
    Issue
    MCP Server Kubernetes before 3.9.0 contains an argument injection vulnerability in structured tools (kubectl_get, kubectl_describe, kubectl_delete) that allows attackers to bypass the assertNoDangerousFlags security check by supplying resourceType and name parameters with leading dashes. Attackers can inject the --server flag to redirect kubectl commands to an attacker-controlled API server, causing the operator's bearer token to be transmitted externally and enabling full cluster compromise.

    Recommended action: Upgrade to 3.9.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  2. Medium, CVSS 6.1npmAmendedPublished

    MCP Server Kubernetes: kubectl-generic flag injection enables Kubernetes bearer token exfiltration

    CVE-2026-47250 · GHSA-6mx4-4h42-r8vh

    Affected
    • npm mcp-server-kubernetes <= 3.6.2
    Fixed in
    3.7.0· Vendor fix available
    Issue
    The kubectlgeneric tool in mcp-server-kubernetes passes user-supplied flags directly to kubectl without any allowlist, enabling a privilege escalation attack within Kubernetes environments. An attacker who already has limited cluster or codebase access, for example, a developer with pod-deployment permissions but not cluster-admin credentials, can plant a single structured JSON line in an application's log output. When an operator with a privileged kubeconfig uses the MCP server to read those logs and their AI agent follows the injected instruction, kubectlgeneric is called with --server=https://attacker.example.com and --insecure-skip-tls-verify=true. kubectl sends all API requests, including the Authorization: Bearer <token header from the operator's kubeconfig to the attacker's endpoint. The captured token can then be replayed directly against the real Kubernetes API server, granting the attacker the full RBAC permissions of the operator's service account. The token…

    Recommended action: Upgrade to 3.7.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. High, CVSS 8.8npmAmendedPublished

    MCP Server Kubernetes: Tool Access Control Bypass via Presentation-Layer Filtering Without Execution-Layer Enforcement

    CVE-2026-46519 · GHSA-cr22-wjx7-2w6m

    Affected
    • npm mcp-server-kubernetes < 3.6.0
    Fixed in
    3.6.0· Vendor fix available
    Issue
    mcp-server-kubernetes exposes three environment variables (ALLOWONLYREADONLYTOOLS, ALLOWONLYNONDESTRUCTIVETOOLS, ALLOWEDTOOLS) documented as access controls for restricting which Kubernetes operations are available. These controls are enforced at the tool discovery layer (tools/list) but not at the execution layer (tools/call). Any client that knows a tool name can invoke it directly regardless of the configured restriction mode. The access control was effectively cosmetic. Fixed in v3.6.0. Impact An attacker or misconfigured AI agent with network access to the MCP server's HTTP endpoint could invoke any Kubernetes tool regardless of the restriction mode configured by the operator -- including kubectldelete, execinpod, kubectlgeneric, and nodemanagement. The project explicitly supports and documents multi-client HTTP deployment scenarios (Streamable HTTP and SSE transports, in-cluster deployments, Codex CLI and Gemini CLI integrations). In these deployments, operators relied…

    Recommended action: Upgrade to 3.6.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. High, CVSS 8.3npmAmendedPublished

    MCP Server Kubernetes has an Argument Injection in port_forward tool via space-splitting

    CVE-2026-39884 · GHSA-4xqg-gf5c-ghwq

    Affected
    • npm mcp-server-kubernetes <= 3.4.0
    Fixed in
    3.5.0· Vendor fix available
    Issue
    The portforward tool in mcp-server-kubernetes constructs a kubectl command as a string and splits it on spaces before passing to spawn(). Unlike all other tools in the codebase which correctly use execFileSync("kubectl", argsArray), portforward uses string concatenation with user-controlled input (namespace, resourceType, resourceName, localPort, targetPort) followed by naive .split(" ") parsing. This allows an attacker to inject arbitrary kubectl flags by embedding spaces in any of these fields. Affected Versions <= 3.4.0 Vulnerability Details File: src/tools/portforward.ts (compiled: dist/tools/portforward.js) The startPortForward function builds a kubectl command string by concatenating user-controlled input: This string is then split on spaces and passed to spawn(): Because .split(" ") treats every space as an argument boundary, an attacker can inject additional kubectl flags by embedding spaces in any of the user-controlled fields. Contrast with other tools Every other…

    Recommended action: Upgrade to 3.5.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. Medium, CVSS 6.4npmAmendedPublished

    mcp-server-kubernetes has potential security issue in exec_in_pod tool

    CVE-2025-66404 · GHSA-wvxp-jp4w-w8wg

    Affected
    • npm mcp-server-kubernetes <= 2.9.7
    Fixed in
    2.9.8· Vendor fix available
    Issue
    A security issue exists in the execinpod tool of the mcp-server-kubernetes MCP Server. The tool accepts user-provided commands in both array and string formats. When a string format is provided, it is passed directly to shell interpretation (sh -c) without input validation, allowing shell metacharacters to be interpreted. This vulnerability can be exploited through direct command injection or indirect prompt injection attacks, where AI agents may execute commands without explicit user intent. Details The MCP Server exposes the execinpod tool to execute commands inside Kubernetes pods. The tool supports both array and string command formats. The Kubernetes Exec API (via @kubernetes/client-node) accepts commands as an array of strings, which executes commands directly without shell interpretation. However, when a string format is provided, the code automatically wraps it in shell execution (sh -c), which interprets shell metacharacters without any input validation. When string…

    Recommended action: Upgrade to 2.9.8 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  6. High, CVSS 7.5npmAmendedPublished

    MCP Server Kubernetes vulnerable to command injection in several tools

    CVE-2025-53355 · GHSA-gjv4-ghm7-q58q

    Affected
    • npm mcp-server-kubernetes < 2.5.0
    Fixed in
    2.5.0· Vendor fix available
    Issue
    A command injection vulnerability exists in the mcp-server-kubernetes MCP Server. The vulnerability is caused by the unsanitized use of input parameters within a call to childprocess.execSync, enabling an attacker to inject arbitrary system commands. Successful exploitation can lead to remote code execution under the server process's privileges. The server constructs and executes shell commands using unvalidated user input directly within command-line strings. This introduces the possibility of shell metacharacter injection (|, , &&, etc.). Details The MCP Server exposes tools (kubectlscale, kubectlpatch , explainresource, etc) to perform several kubernetes operations. An MCP Client can be instructed to execute additional actions for example via prompt injection when asked to read pod logs. Below some example of vulnerable code and different ways to test this vulnerability including a real example of indirect prompt injection that can lead to arbitrary command injection.…

    Recommended action: Upgrade to 2.5.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →