# mcp-server-kubernetes: a dash in a tool argument becomes a kubectl flag

> A flag-shaped argument slips through mcp-server-kubernetes into kubectl and reads files the tool should not expose.

- **Severity:** Medium: Real and reproducible, but needs unusual setup, user help or a narrow audience. Plan a fix.
- **Category:** Vulnerability
- **Published by:** VulnCheck
- **Disclosed:** 2026-11-22
- **CVE:** CVE-2026-134817
- **CVSS:** 7.1
- **Affects:** mcp-server-kubernetes, mcp-server-kubernetes (npm)
- **Research by:** Zachariah Mithani (AploSec)
- **Primary source:** https://www.vulncheck.com/advisories/mcp-server-kubernetes-before-4.2.0-argument-injection-via-flag-shaped-positional-operands
- **Page:** https://theinjection.dev/items/mcp-server-kubernetes-argument-injection/

CVE-2026-134817 lets a remote MCP client send dash-prefixed values as positional operands to mcp-server-kubernetes, so kubectl reads them as flags. VulnCheck says --filename then reads files on the server's host. Fixed in 4.2.0.

## What happened

VulnCheck published the advisory for CVE-2026-134817 on 22 November 2026 and credits Zachariah Mithani of AploSec. The flaw sits in mcp-server-kubernetes, a community MCP server that hands coding agents kubectl and Helm operations against a cluster. The fix shipped in release 4.2.0, under the heading Hardening of kubectl argument handling.

## How it works

The server passes tool arguments to kubectl as positional operands without checking whether a value begins with a dash, and kubectl then reads such a value as a flag. VulnCheck names exec_in_pod, kubectl_patch and kubectl_logs as examples. A client that passes --filename makes kubectl read a file from the host running the server, which gets past the server's own file-read restrictions.

## Who is affected

Every version of mcp-server-kubernetes before 4.2.0 is affected. VulnCheck describes the path for clients connected over SSE or Streamable HTTP. The project gates its Streamable HTTP transport behind the environment variable ENABLE_UNSAFE_STREAMABLE_HTTP_TRANSPORT, and its documented setups for Claude Code, Claude Desktop, VS Code and Cursor use stdio instead.

## What to do

Update mcp-server-kubernetes to 4.2.0 or later. Update first if you enabled the Streamable HTTP transport, since that is the configuration VulnCheck describes as reachable by a remote client.

## Quick facts

- **Affected:** mcp-server-kubernetes before 4.2.0
- **Fixed in:** 4.2.0
- **Found by:** Zachariah Mithani, AploSec
- **Attack type:** Argument injection into kubectl
- **Exposed transports:** SSE and Streamable HTTP, per VulnCheck
- **Disclosed:** 22 November 2026

## Sources

1. [VulnCheck Advisory](https://www.vulncheck.com/advisories/mcp-server-kubernetes-before-4.2.0-argument-injection-via-flag-shaped-positional-operands)
2. [GitHub Advisory](https://github.com/advisories/GHSA-8v48-c263-r637)
3. [Release 4.2.0](https://github.com/Flux159/mcp-server-kubernetes/releases/tag/v4.2.0)
