CVE-2025-66404: mcp-server-kubernetes command injection in exec_in_pod

CVE-2025-66404 · Severity: low · CVSS 3.1 · Published 2025-12-03

mcp-server-kubernetes is a server that exposes tools for managing Kubernetes clusters via AI agents. The exec_in_pod tool allows executing commands inside containers but fails to validate user input, permitting attackers or malicious AI prompts to inject arbitrary shell commands. An attacker with access to the server can execute unauthorized commands with the privileges of the running pod, potentially compromising container data and operations.

Technologies: mcp-server-kubernetes (npm). Vendors: npm.

Quick answers

Is CVE-2025-66404 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-66404 being exploited in the wild.
How severe is CVE-2025-66404?
Low severity, with a CVSS score of 3.1, published 3 December 2025.
Which products and versions are affected?
mcp-server-kubernetes (npm) SEMVER:introduced=0,fixed=2.9.8.
Is there a fix for CVE-2025-66404?
Yes. mcp-server-kubernetes (npm): upgrade to 2.9.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2025-66404 attacked?
It is attacked over the network.
Am I affected by CVE-2025-66404?
Check whether you run mcp-server-kubernetes (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • mcp-server-kubernetes (npm): upgrade to 2.9.8 or later
    npm install mcp-server-kubernetes@2.9.8

Technical details

The vulnerability is a command injection flaw in the exec_in_pod function (src/tools/exec_in_pod.ts). When a string-format command is provided, the code wraps it in shell execution (/bin/sh -c) without validating or escaping shell metacharacters (;, &&, |, >, <, $). An attacker can inject commands via direct tool invocation or indirectly through prompt injection in pod logs that AI agents consume. Exploitation requires network access to the MCP server and either direct tool access or the ability to influence AI agent prompts. The fix is available in version 2.9.8 and later, which adds input validation to sanitize or reject shell metacharacters in string commands.

Affected products

  • Flux159 mcp-server-kubernetes <= 2.9.7

Identifiers

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

Timeline

  • 2025-12-03: disclosed
  • 2025-12-03: patched: version 2.9.8 and later

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.