mcp-server-kubernetes

Ecosystem: npm

Downloads:

Vulnerabilities from the last (months)
  • 1CriticalAffects 1 version
  • 3HighAffects 3 versions
  • 0MediumAffects 0 versions
  • 2ModerateAffects 2 versions
  • 0LowAffects 0 versions
Severity distribution (all time)
6vulnerabilities
  • Critical1 (16.7%)
  • High3 (50.0%)
  • Medium0 (0.0%)
  • Moderate2 (33.3%)
  • Low0 (0.0%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 1 vulnerabilities
    • Critical: 1
    • High: 0
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0

Vulnerabilities (6)

Known vulnerabilities affecting mcp-server-kubernetes, based on data from OSV.

Vulnerabilities affecting mcp-server-kubernetes
IDSeveritySummaryAffected versionsPublishedSource
GHSA-wmg3-h8mf-wgvrCriticalmcp-server-kubernetes argument injection can expose Kubernetes cluster credentialsMCP 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.
  • < 3.9.0
GitHub (opens in a new tab)
GHSA-6mx4-4h42-r8vhModerateMCP Server Kubernetes: kubectl-generic flag injection enables Kubernetes bearer token exfiltration### Summary The `kubectl_generic` 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, `kubectl_generic` is ca
  • < 3.7.0
GitHub (opens in a new tab)
GHSA-cr22-wjx7-2w6mHighMCP Server Kubernetes: Tool Access Control Bypass via Presentation-Layer Filtering Without Execution-Layer Enforcement## Summary `mcp-server-kubernetes` exposes three environment variables (`ALLOW_ONLY_READONLY_TOOLS`, `ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS`, `ALLOWED_TOOLS`) 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 t
  • < 3.6.0
GitHub (opens in a new tab)
GHSA-4xqg-gf5c-ghwqHighMCP Server Kubernetes has an Argument Injection in port_forward tool via space-splitting## Summary The `port_forward` 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)`, `port_forward` 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
  • < 3.5.0
GitHub (opens in a new tab)
GHSA-wvxp-jp4w-w8wgModeratemcp-server-kubernetes has potential security issue in exec_in_pod tool### Summary A security issue exists in the `exec_in_pod` 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 `exec_in_pod` tool to execute commands ins
  • < 2.9.8
GitHub (opens in a new tab)
GHSA-gjv4-ghm7-q58qHighMCP Server Kubernetes vulnerable to command injection in several tools### Summary 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 `child_process.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 Serv
  • < 2.5.0
GitHub (opens in a new tab)
  • GHSA-wmg3-h8mf-wgvrCritical
    mcp-server-kubernetes argument injection can expose Kubernetes cluster credentials
    • < 3.9.0

    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.

    CVE: CVE-2026-61459

  • GHSA-6mx4-4h42-r8vhModerate
    MCP Server Kubernetes: kubectl-generic flag injection enables Kubernetes bearer token exfiltration
    • < 3.7.0

    ### Summary The `kubectl_generic` 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, `kubectl_generic` is ca

    CVE: CVE-2026-47250

  • GHSA-cr22-wjx7-2w6mHigh
    MCP Server Kubernetes: Tool Access Control Bypass via Presentation-Layer Filtering Without Execution-Layer Enforcement
    • < 3.6.0

    ## Summary `mcp-server-kubernetes` exposes three environment variables (`ALLOW_ONLY_READONLY_TOOLS`, `ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS`, `ALLOWED_TOOLS`) 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 t

    CVE: CVE-2026-46519

  • GHSA-4xqg-gf5c-ghwqHigh
    MCP Server Kubernetes has an Argument Injection in port_forward tool via space-splitting
    • < 3.5.0

    ## Summary The `port_forward` 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)`, `port_forward` 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

    CVE: CVE-2026-39884

  • GHSA-wvxp-jp4w-w8wgModerate
    mcp-server-kubernetes has potential security issue in exec_in_pod tool
    • < 2.9.8

    ### Summary A security issue exists in the `exec_in_pod` 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 `exec_in_pod` tool to execute commands ins

    CVE: CVE-2025-66404

  • GHSA-gjv4-ghm7-q58qHigh
    MCP Server Kubernetes vulnerable to command injection in several tools
    • < 2.5.0

    ### Summary 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 `child_process.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 Serv

    CVE: CVE-2025-53355

Showing 1-6 of 6 vulnerabilities