Description
MCP Server Kubernetes before 3.9.0 contains an argument injection vulnerability in structured tools (kubectl_get, kubectl_describe, kubectl_delete) that allows attackers to bypass the assertNoDangerousFlags security check by supplying resourceType and name parameters with leading dashes. Attackers can inject the --server flag to redirect kubectl commands to an attacker-controlled API server, causing the operator's bearer token to be transmitted externally and enabling full cluster compromise.
Problem types
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Product status
Any version before 3.9.0
Credits
George Chen
References
github.com/Flux159/mcp-server-kubernetes/releases/tag/3.9.0 (Release Notes)
github.com/Flux159/mcp-server-kubernetes/issues/328 (Researcher Disclosure)
github.com/Flux159/mcp-server-kubernetes/pull/329 (Pull Request)
github.com/...ommit/d7890f50a4567bf5d9842541ba6f41e180227f9a (Patch Commit)
www.vulncheck.com/...-injection-via-kubectl-structured-tools