---
title: mcp-server-kubernetes before 4.2.0 (CVE-2026-134817): remote MCP clients can smuggle kubectl flags as positional values to read files on the server host | ctxsec
url: https://ctxsec.com/items/mcp-server-kubernetes-cve-2026-134817-flag-shaped-positional-operands-kubectl-file-read-fixed-4-2-0
description: "In Flux159's mcp-server-kubernetes before 4.2.0, tools such as exec_in_pod, kubectl_patch and kubectl_logs pass dash-prefixed positional values to kubectl, so a client connected over SSE or Streamable HTTP can supply things like --filename and make kubectl read files from the server host, bypassing its file-read guards. It is the latest in a run of flag-injection fixes in this server. A public PoC is reported. Upgrade to 4.2.0."
status: "primary (GitHub Advisory GHSA-8v48-c263-r637; mcp-server-kubernetes v4.2.0 release and PR #390)"
published: 2026-11-24
---

> In Flux159's mcp-server-kubernetes before 4.2.0, tools such as exec_in_pod, kubectl_patch and kubectl_logs pass dash-prefixed positional values to kubectl, so a client connected over SSE or Streamable HTTP can supply things like --filename and make kubectl read files from the server host, bypassing its file-read guards. It is the latest in a run of flag-injection fixes in this server. A public PoC is reported. Upgrade to 4.2.0.

[← Context & Harness Attacks](/context) · [markdown](/items/mcp-server-kubernetes-cve-2026-134817-flag-shaped-positional-operands-kubectl-file-read-fixed-4-2-0.md)

primary (GitHub Advisory GHSA-8v48-c263-r637; mcp-server-kubernetes v4.2.0 release and PR #390)

2026-11-24 4:46 AM ET

### mcp-server-kubernetes before 4.2.0 (CVE-2026-134817): remote MCP clients can smuggle kubectl flags as positional values to read files on the server host

- Affected: mcp-server-kubernetes before 4.2.0 when exposed over SSE or Streamable HTTP transport.
- Cause: dash-prefixed operands in tools like exec_in_pod, kubectl_patch and kubectl_logs are parsed by kubectl as flags.
- The project's advisory list shows several earlier flag-injection and file-read fixes (for example GHSA-jjrr-53h8-h34w, GHSA-c257-86m4-m579), so treat any remote-transport Kubernetes MCP server as able to reach the host's files and the operator's credentials.
- Do: upgrade to 4.2.0, keep it on stdio or behind authentication, and give it a scoped kubeconfig.

Sources: [GitHub Advisory Database: GHSA-8v48-c263-r637 (CVE-2026-134817, Nov 23, 2026)](https://github.com/advisories/GHSA-8v48-c263-r637) · [mcp-server-kubernetes v4.2.0 release](https://github.com/Flux159/mcp-server-kubernetes/releases/tag/v4.2.0)
