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.
Problem types
CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Product status
References
github.com/...rnetes/security/advisories/GHSA-wvxp-jp4w-w8wg
github.com/...rnetes/security/advisories/GHSA-wvxp-jp4w-w8wg
github.com/...ommit/d091107ff92d9ffad1b3c295092f142d6578c48b
Data based on CVE®. Copyright © 1999-2025, The MITRE Corporation. All rights reserved.