On this page
If you run the Kubernetes MCP server where other machines can reach it, anyone who can connect to it before version 4.2.0 can trick it into reading files off the machine it runs on. What they can reach depends on what that machine's account can read. The project's own advisory on a sibling tool named a mounted kubeconfig and the pod's service account token as examples. The fix is version 4.2.0, and the project has since shipped 4.2.3.
How to fix
Upgrade the package to 4.2.0 or later:
npm install mcp-server-kubernetes@latest
If you start it with npx and a pinned version, change the pin. If you run the Helm chart or a container image, rebuild or redeploy on a tag that carries 4.2.0 or later. Then confirm what is installed:
npm ls mcp-server-kubernetes
The 4.2.0 release notes describe it as hardening of kubectl argument handling, including "flag-shaped operand checks in the remaining tools" (pull request #390). Later releases are 4.2.1 (tool arguments validated against each tool's input schema), 4.2.2 and 4.2.3, so moving past 4.2.0 is fine.
If you cannot upgrade today, stop serving the HTTP or SSE transport and go back to the default local stdio launch. If you must keep it on the network, keep HOST at its localhost default or put an authenticated proxy in front, and set MCP_AUTH_TOKEN as the project's advanced README recommends for production. Those are mitigations from the project docs, not a substitute for the fix.
What happens before 4.2.0
Several tools build a kubectl command line from values the MCP client sends. Names such as a pod name or a resource type go into the command as plain positional words. kubectl treats any word that starts with a dash as an option wherever it sits. So a client that sends --filename=/some/path where a pod name belongs gets kubectl to read that path on the server host. The CVE record lists exec_in_pod, kubectl_patch and kubectl_logs as examples. The 4.2.0 pull request adds checks to eight tools in total: exec_in_pod, kubectl_patch, kubectl_rollout, kubectl_logs, kubectl_create, explain_resource, node_management and port_forward.
The server already had a deny list of dangerous flag names and file-read guards for remote clients on some tools. This bug walks around them: the guard looks at known flag names and at specific path parameters, and a dash-prefixed value in an ordinary name slot was not checked. The record says it bypasses the file-read restrictions.
Who is not in scope
The record names remote MCP clients connected over SSE or Streamable HTTP. If you only launch the server as a local stdio process from your editor or agent (npx mcp-server-kubernetes in a client config, which is how the project's README sets up Claude Code, Codex, VS Code and Cursor), no remote client is connected to it and the reported path does not apply. The HTTP transport only starts when ENABLE_UNSAFE_STREAMABLE_HTTP_TRANSPORT is set, and the SSE transport only when ENABLE_UNSAFE_SSE_TRANSPORT is set. Versions 4.2.0 and later are the fixed range.
One check to run now
On the host or in the container that runs the server, look for the two transport switches and the installed version:
env | grep ENABLE_UNSAFE
npm ls mcp-server-kubernetes
If neither ENABLE_UNSAFE_STREAMABLE_HTTP_TRANSPORT nor ENABLE_UNSAFE_SSE_TRANSPORT is set, the server is on stdio and you are outside the reported path. If either is set and the version is below 4.2.0, you are in scope. The HTTP transport serves /mcp and the SSE transport serves /sse, so a listening port on either path confirms it. The project's Helm chart also offers http and sse transport modes that bind the pod to all interfaces, so check chart values if you deploy it that way.
What this is not
This is a file read through kubectl options, not code execution on its own, and the CVSS 7.1 vector lists network access with low privileges required, so it is not scored as an anonymous takeover. The sources checked for this post do not mark it as known exploited, and it is not on the CISA KEV list.
Why a Kubernetes MCP server is worth patching quickly
The server runs as whatever identity it was given: a kubeconfig, a service account token, or cluster credentials in environment variables. A client that can make it read host files gets near those credentials. Because the model sends the arguments, a prompt that steers the agent could also send a dash-prefixed name, but the record describes direct remote clients and we have not seen a source that shows that route, so treat it as plausible, not confirmed. For the broader pattern of what MCP servers pass through to their backends, see what MCP token passthrough means and what MCP tool annotations are. A similar remote-caller problem in another infrastructure MCP server is covered in the Grafana MCP Server SSRF write-up, and if you want a guard on what an agent can run against a cluster from the laptop side, see how HOL Guard handles kubectl secret reads.
Is CVE-2026-134817 the same as the earlier mcp-server-kubernetes advisories?
No. The project has published several advisories this year on the same area, including flag injection in kubectl and helm tools and a missing path guard on kubectl_patch. CVE-2026-134817 is its own record, published Nov 22, 2026 by VulnCheck, with CWE-88 (argument injection) and a fix in 4.2.0. If you are already on 4.2.0 or later, you have the fix for this one. If you are on an older 4.1.x build because of an earlier advisory fix, you still need to move.
Sources
- NVD record for CVE-2026-134817 (VulnCheck, CWE-88, CVSS 3.1 vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N)
- Flux159/mcp-server-kubernetes pull request #390 and the v4.2.0 release
- VulnCheck advisory
- Source record and evidence timeline: HOL Guard evidence pack for CVE-2026-134817
Want to see what your agents and MCP servers can reach? Scan your agent setup with HOL Guard (free). More in the HOL Guard CVE index.
