# CVE-2025-66404: mcp-server-kubernetes potential security issue in exec_in_pod tool

> Attackers can execute arbitrary shell commands via the exec_in_pod tool due to lack of input validation, potentially compromising Kubernetes clusters.

- **Severity:** Medium 6.4 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 3 Dec 2025
- **Updated:** 3 Dec 2025
- **Also known as:** GHSA-wvxp-jp4w-w8wg

## What is CVE-2025-66404?

CVE-2025-66404 is a medium-severity command injection vulnerability in Flux159 mcp-server-kubernetes, published on 3 Dec 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2025-66404?

2 open source packages ship an affected version, including mcp-server-kubernetes. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mcp-server-kubernetes` | npm | All versions | 2.9.8 |
| `mcp-server-kubernetes` | npm | All versions | 2.9.8 |

Products: Suyogs Mcp-Server-Kubernetes.

## How do I fix CVE-2025-66404?

Upgrade mcp-server-kubernetes to 2.9.8 or later.

## Is CVE-2025-66404 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66404 exists.

## Other vulnerabilities in Flux159 mcp-server-kubernetes

- [CVE-2026-61459](https://insights.sbomify.com/CVE-2026-61459/): MCP Server Kubernetes < 3.9.0 Argument Injection via kubectl Structured Tools (critical 9.3)
- [CVE-2026-39884](https://insights.sbomify.com/CVE-2026-39884/): MCP Server Kubernetes has Argument Injection in its port_forward tool via space-splitting (high 8.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-66404 and fix it if it is affected.

What it is: CVE-2025-66404 is a medium-severity command injection vulnerability in Flux159 mcp-server-kubernetes, published on 3 Dec 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66404 exists.

Affected packages and fixed versions:
- mcp-server-kubernetes (npm): affected all versions; fixed in 2.9.8
- mcp-server-kubernetes (npm): affected all versions; fixed in 2.9.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-66404/ (Markdown: https://insights.sbomify.com/CVE-2025-66404/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-66404
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-66404
- OSV: https://osv.dev/vulnerability/CVE-2025-66404

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-66404/
Summaries are generated and may contain mistakes; the official description above is the record.
