Impact
The vulnerability is an argument injection flaw in the port_forward tool of mcp-server-kubernetes. The code builds a kubectl command using string concatenation with user-supplied fields and naively splits the resulting string on spaces before passing it to spawn(). Each user-controlled space is treated as an argument boundary, allowing an attacker to inject arbitrary kubectl flags. This enables exposure of internal Kubernetes services to the network, cross-namespace targeting by injecting additional -n flags, and potential indirect exploitation via prompt injection against AI agents connected to the MCP server. The weakness is identified as CWE‑88 (Argument Injection).
Affected Systems
The affected product is Flux159's mcp-server-kubernetes. Versions 3.4.0 and earlier are vulnerable, as indicated by the advisory. A patch in version 3.5.0 addresses the flaw.
Risk and Exploitability
The CVSS score of 8.3 marks this as high. The EPSS score is not available, but the advisory notes that the issue can be exploited by supplying crafted arguments to the port_forward tool, which may be remotely accessible or available to privileged users. The vulnerability is not currently listed in the CISA KEV catalog, and no public exploit has been reported. Attackers would need to target the MCP server’s port_forward endpoint and provide malicious input; if the endpoint is exposed to untrusted users, the risk of internal service exposure is significant.
OpenCVE Enrichment
Github GHSA