← All advisories

CVE-2026-134817highAgent hijacking2026-11-22

CVE-2026-134817: mcp-server-kubernetes let MCP clients pass dash-prefixed names like --filename=<path> to kubectl through tools such as exec_in_pod, kubectl_patch and kubectl_logs, reading files from the server host (fixed 4.2.0)

mcp-server-kubernetes (Flux159) is a popular MCP server that lets AI agents run kubectl against a cluster. Before 4.2.0, several tools put caller-supplied values straight into kubectl's positional operand slots. kubectl's flag parser treats any dash-prefixed token as a flag wherever it appears, so a resource or pod name like --filename=<path> was parsed as a flag, making kubectl read files from the machine running the MCP server and bypassing the server's own file-read restrictions. Clients connected over the SSE or Streamable HTTP transports could do this, and so can a prompt-injected agent. Fixed in 4.2.0.

01.

What it is

Affected tools (per PR #390): exec_in_pod (name), kubectl_patch (resourceType, name), kubectl_rollout (subCommand, resourceType, name), kubectl_logs (name), kubectl_create (name, secretType, serviceType), explain_resource (resource), node_management (nodeName) and port_forward (resourceType).

An earlier change (#369) had already added the flag-shaped operand check to kubectl_get, kubectl_describe, kubectl_delete, kubectl_scale and kubectl_generic; these remaining tools were missing it.

v4.2.0 (released 26 October 2026) bundles the fix with other kubectl argument hardening: a verb policy for kubectl_generic, fail-closed argv checks, kubectl_create input validation, private temp files, and kubectl_context set disabled in read-only mode.

NVD published the CVE (CNA VulnCheck, CWE-88 argument injection) on 22 November 2026.

02.

How to check

  1. Check the installed version: anything below 4.2.0 is affected (npx mcp-server-kubernetes, or the version pinned in your MCP client config).
  2. Pay most attention to deployments exposed over SSE or Streamable HTTP rather than local stdio.
  3. Review MCP tool-call logs for operands that start with a dash (for example --filename, -f, --kubeconfig).
03.

How to fix

  1. Upgrade mcp-server-kubernetes to 4.2.0 or later.
  2. Run it with a least-privilege kubeconfig and in read-only mode where agents only need to inspect the cluster.
  3. Don't expose the HTTP transports beyond localhost without authentication, and don't let an agent with this server process untrusted content.
npm ls -g mcp-server-kubernetes
# or check the version pinned in your MCP client config, then pin:
npx -y [email protected]
04.

Sources

Related on VibeVulns
More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.