CVE-2025-66404: mcp-server-kubernetes Command Injection Vulnerability

mcp-server-kubernetes Updated 03 Dec 2025

Summary

03/12/2025
Yes i
Moderate
6.4

CVE-2025-66404: mcp-server-kubernetes has potential security issue in exec_in_pod tool. Affects mcp-server-kubernetes versions < 2.9.8. Fixed in 2.9.8. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

mcp-server-kubernetes is an open-source MCP Server that facilitates the execution of commands within Kubernetes pods. It allows users to interact with Kubernetes resources and manage them effectively. However, the exec_in_pod tool within this package has a significant security flaw that can lead to command injection attacks, compromising the integrity and security of the Kubernetes environment.

Vulnerability Detail

The vulnerability arises from the exec_in_pod tool's handling of user-provided commands. When commands are provided in string format, they are executed directly by the shell without any input validation. This allows attackers to inject malicious commands using shell metacharacters, leading to potential unauthorized access and manipulation of sensitive data within Kubernetes pods. The vulnerability can be exploited through direct command injection or indirect prompt injection, where AI agents may execute unintended commands based on manipulated input.

How To Fix

Latest published version: 4.1.9 as of 23 Oct 2026

npm install mcp-server-kubernetes@4.1.9

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.9.8

This is the first release that contains the fix.

npm install mcp-server-kubernetes@2.9.8

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the string format for commands in the exec_in_pod tool. Instead, always provide commands as an array of strings to prevent shell interpretation. For example, use the following format:

execInPod(k8sManager, { name: 'test-pod', command: ['id'] });

Conclusion

The CVE-2025-66404 vulnerability in the mcp-server-kubernetes package poses a significant risk due to command injection possibilities. It is crucial to update to the patched version to mitigate this risk and ensure the security of your Kubernetes environment.

See every vulnerability recorded for mcp-server-kubernetes →

Share this vulnerability

FAQ

CVE-2025-66404 is a security vulnerability in the mcp-server-kubernetes package that allows for command injection through the exec_in_pod tool.

Attackers can exploit this vulnerability by injecting malicious commands using shell metacharacters when executing commands in string format.

The impacts include unauthorized command execution, access to sensitive data, and modification of pod states within Kubernetes.

Yes, the vulnerability is patched in version 2.9.8 of the mcp-server-kubernetes package.

You can use Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected by this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for mcp-server-kubernetes.

How To Fix

Latest published version: 4.1.9 as of 23 Oct 2026

npm install mcp-server-kubernetes@4.1.9

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.9.8

This is the first release that contains the fix.

npm install mcp-server-kubernetes@2.9.8

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback