AAK-MCP-K8S-CVE-2026-61459-001: mcp-server-kubernetes below 3.9.0 (argument injection → kubectl --server redirect)
- Severity
- CRITICAL
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
McpServerKubernetesArgInjection
What it detects
mcp-server-kubernetes before 3.9.0 has an argument-injection flaw in its structured tools (kubectl_get, kubectl_describe, kubectl_delete): resourceType / name parameters with leading dashes bypass the assertNoDangerousFlags check, so an attacker can inject --server to redirect kubectl at an attacker-controlled API server, exfiltrating the operator's bearer token and enabling full cluster compromise (CVE-2026-61459, CVSS 9.8 CRITICAL). Fixed in 3.9.0.
How to fix
Upgrade mcp-server-kubernetes to >= 3.9.0 and pin it. Reject tool arguments beginning with - and pass a -- end-of-options separator before caller-supplied values to any spawned kubectl command.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-K8S-CVE-2026-61459-001
Limitations
Reads mcp-server-kubernetes in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (packages/app/package.json), in .cursor/mcp.json or .vscode/mcp.json, or in a lockfile format the reader does not parse (a Yarn 2+ yarn.lock). The flux159/mcp-server-kubernetes image tag is not read, in a compose file or in an MCP config that starts it with docker run. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-61459
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP05:2025 (Command Injection & Execution)
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-01 (Shell Injection via MCP)
- CSA AI Controls Matrix (AICM): AIS-07, IVS-09, STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-K8S-CVE-2026-61459-001.md: the page then shows that text, with the registry reference appended under it.