CVE-2025-53355: Command Injection Vulnerability in mcp-server-kubernetes
Summary
CVE-2025-53355: MCP Server Kubernetes vulnerable to command injection in several tools. Affects mcp-server-kubernetes versions < 2.5.0. Fixed in 2.5.0. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
mcp-server-kubernetes is an open-source tool designed to facilitate Kubernetes operations through a command-line interface. It provides functionalities such as scaling deployments, patching resources, and explaining Kubernetes resources. However, due to its reliance on user input for command execution, it is susceptible to command injection vulnerabilities, which can lead to severe security risks.
Vulnerability Detail
The vulnerability arises from the unsanitized use of user input in the child_process.execSync function, allowing attackers to inject arbitrary system commands. This can lead to remote code execution under the privileges of the server process. The specific tools affected include kubectl_scale, kubectl_patch, and others that execute shell commands based on user input. Attackers can exploit this vulnerability through indirect prompt injection, where malicious commands are embedded in log messages or user prompts, leading to unintended command execution.
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.5.0
This is the first release that contains the fix.
npm install mcp-server-kubernetes@2.5.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using child_process.execSync with untrusted input. Instead, consider using child_process.execFileSync, which allows you to pass command arguments as a separate array, thus preventing shell interpretation. For example:
const { execFileSync } = require('child_process');
const command = 'kubectl';
const args = ['scale', 'deployment', input.name, '--replicas', input.replicas, '--namespace', namespace];
const result = execFileSync(command, args, { encoding: 'utf8' });
Conclusion
The command injection vulnerability in mcp-server-kubernetes (CVE-2025-53355) poses significant security risks due to its potential for remote code execution. It is crucial for users to update to the patched version 2.5.0 or later and to consider implementing workarounds to mitigate risks until an update can be applied.
See every vulnerability recorded for mcp-server-kubernetes →
FAQ
CVE-2025-53355 is a command injection vulnerability found in the mcp-server-kubernetes package, allowing attackers to execute arbitrary commands on the server.
You can check if your application is affected by using Vulert, which monitors vulnerabilities in open-source packages. Visit Vulert Scanner to test your application without any signup.
The vulnerability can lead to remote code execution, allowing attackers to execute commands with the server's privileges, potentially compromising the entire system.
You can update the package to the patched version by running the command: npm install mcp-server-kubernetes@2.5.0.
If an immediate update is not possible, implement the workaround by using execFileSync instead of execSync to avoid command injection risks.
References
Related vulnerabilities
Recent vulnerabilities recorded for mcp-server-kubernetes.