Description
mcp-server-kubernetes before 4.2.0 contains an argument injection vulnerability that allows remote MCP clients to inject kubectl flags by supplying dash-prefixed values as positional operands in tools such as exec_in_pod, kubectl_patch, and kubectl_logs. Attackers connected over SSE or Streamable HTTP transport can supply values like --filename to make kubectl read files from the server host, bypassing file-read restrictions.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Flux159 | mcp-server-kubernetes | < 4.2.0 | 4.2.0 |
References
- https://github.com/Flux159/mcp-server-kubernetes/pull/390 patch issue-tracking
- https://github.com/Flux159/mcp-server-kubernetes/commit/588d4949b0233974c3966a7d24d532be11e56d0d patch
- mcp-server-kubernetes v4.2.0 Release Notes release-notes
- https://github.com/Flux159/mcp-server-kubernetes/blob/v4.1.9/src/tools/exec_in_pod.ts#L105 technical-description
- VulnCheck Advisory: mcp-server-kubernetes before 4.2.0 Argument Injection via Flag-Shaped Positional Operands third-party-advisory