Skip to content
Heist/ feed
Back to feed
Medium

mcp-server-kubernetes potential security issue in exec_in_pod tool

Type: advisorySources: OSV

MCP Server Kubernetes is an MCP Server that can connect to a Kubernetes cluster and manage it. Prior to 2.9.8, there is 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. This vulnerability is fixed in 2.9.8.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-66404
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 05:45 UTC · Revision 1

Source evidence

mcp-server-kubernetes potential security issue in exec_in_pod tool

core-osv · Original source

Published 3 Dec 2025, 20:40 UTC

MCP Server Kubernetes is an MCP Server that can connect to a Kubernetes cluster and manage it. Prior to 2.9.8, there is 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. This vulnerability is fixed in 2.9.8.

osv:CVE-2025-66404
Complete source record
{
  "id": "7aebc53b631c58c9084d5eeb31d0d80efea5d99074e659e1dd7b20104bf19e94",
  "url": "https://osv.dev/vulnerability/CVE-2025-66404",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mcp-server-kubernetes potential security issue in exec_in_pod tool",
    "summary": "MCP Server Kubernetes is an MCP Server that can connect to a Kubernetes cluster and manage it. Prior to 2.9.8, there is 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. This vulnerability is fixed in 2.9.8.",
    "evidence": "osv:CVE-2025-66404",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-66404",
      "aliases": [
        "CVE-2025-66404",
        "GHSA-wvxp-jp4w-w8wg"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/flux159/mcp-server-kubernetes",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3fe655f07301464320bbdc0e013d6def126ae0e5"
                },
                {
                  "fixed": "d091107ff92d9ffad1b3c295092f142d6578c48b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:suyogs:mcp-server-kubernetes:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.9.8"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "d091107ff92d9ffad1b3c295092f142d6578c48b"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.9.7",
            "v2.9.7",
            "2.9.6",
            "v2.9.6",
            "2.9.5",
            "v2.9.5",
            "2.9.4",
            "v2.9.4",
            "2.9.3",
            "v2.9.3",
            "2.9.2",
            "v2.9.2",
            "2.9.1",
            "v2.9.1",
            "2.9.0",
            "v2.9.0",
            "2.8.0",
            "v2.8.0",
            "2.7.0",
            "v2.7.0",
            "2.6.0",
            "v2.6.0",
            "2.5.1",
            "v2.5.1",
            "2.5.0",
            "v2.5.0",
            "2.4.9",
            "v2.4.9",
            "v2.4.8",
            "2.4.7",
            "v2.4.7",
            "2.4.6",
            "v2.4.6",
            "2.4.5",
            "v2.4.5",
            "2.4.4",
            "v2.4.4",
            "2.4.3",
            "2.4.1",
            "v2.4.3",
            "2.4.2",
            "v2.4.2",
            "v2.4.1",
            "2.4.0",
            "2.3.1",
            "v2.4.0",
            "v2.3.1",
            "2.3.0",
            "v2.3.0",
            "2.2.1",
            "v2.2.1",
            "2.2.0",
            "v2.2.0",
            "2.1.1",
            "v2.1.1",
            "2.1.0",
            "v2.1.0",
            "2.0.0",
            "v2.0.0",
            "1.6.2",
            "v1.6.2",
            "1.6.1",
            "v1.6.1",
            "1.6.0",
            "v1.6.0",
            "1.5.0",
            "v1.5.0",
            "1.4.0",
            "v1.4.0",
            "1.3.2",
            "v1.3.2",
            "1.3.1",
            "v1.3.1",
            "1.3.0",
            "v1.3.0",
            "1.2.0",
            "v1.2.0",
            "1.1.0",
            "v1.1.0",
            "1.0.1",
            "v1.0.1",
            "1.0.0",
            "v1.0.0",
            "0.4.0",
            "v0.4.0",
            "0.3.2",
            "v0.3.2",
            "0.3.1",
            "v0.3.1",
            "0.3.0",
            "v0.3.0",
            "0.2.5",
            "v0.2.5",
            "0.2.4",
            "v0.2.4",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-66404.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:43.211848821Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/66xxx/CVE-2025-66404.json",
        "https://github.com/Flux159/mcp-server-kubernetes/security/advisories/GHSA-wvxp-jp4w-w8wg",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-66404",
        "https://github.com/Flux159/mcp-server-kubernetes/commit/d091107ff92d9ffad1b3c295092f142d6578c48b"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-77"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/66xxx/CVE-2025-66404.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-66404",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 510810,
  "published_at": "2025-12-03T20:40:11.046+00:00"
}