KUBESHARK · CVE-2026-129235 · AI agents & MCP
FIX → 0.0.2-0.20260812200004-a76a1920dc75
The Kubeshark MCP tool download_file writes Hub API responses to a caller-chosen destination path with no validation, and its path argument can reach any Hub endpoint. An attacker who injects instructions into content an AI agent driving kubeshark mcp reads can overwrite user-writable files such as ~/.ssh/authorized_keys and read captured traffic from an unauthenticated default Hub.
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 kubeshark mcp as an MCP server for an AI agent on a host with user-writable files, or that run a default auth-disabled Kubeshark Hub whose captured traffic could be read. Exposure depends on the agent ingesting untrusted content; systems without the kubeshark mcp subcommand in use are not affected.
Not affected if default-config-not-applicable, mcp-not-used, version-outside-range
Who cares ai-agents, go, kubernetes, kubeshark, mcp
kubeshark version or check the Go module version of github.com/kubeshark/kubeshark and compare with the affected range (>= v53.1.0, < v53.4.0).kubeshark mcp is used by any AI agent on the machine or in CI.Ecosystem / package: Go — github.com/kubeshark/kubeshark (the kubeshark
CLI, kubeshark mcp subcommand)
Affected component: cmd/mcpRunner.go, MCP tool download_file
Affected versions: >= v53.1.0, < v53.4.0 (the flaw shipped with the
tool'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 download_file MCP tool fetches a caller-supplied path from the Kubeshark
Hub API and writes the response body to a caller-supplied dest on the local
filesystem with no validation of dest. An attacker who can influence the MCP
tool arguments — e.g. via indirect prompt injection against an AI agent driving
— can write attacker-controlled bytes to an arbitrary path
writable by the user running the MCP server (e.g. ,
, ), and can request arbitrary Hub API endpoints.
is registered unconditionally (available in the default,
non- posture).
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
v53.4.0 (fixed by commit a76a1920, PR #1957).github.com/kubeshark/kubeshark: fixed in 0.0.2-0.20260812200004-a76a1920dc75.AUTH_ENABLED=true as a workaround.kubeshark mcp~/.ssh/authorized_keys~/.kube/config~/.bashrcdownload_file--allow-destructiveCommit eb7dc42b — "Add get_file_url and download_file MCP tools (#1853)",
2026-03-04 — first released in v53.1.0 (v53.1.0~1). An earlier attempt
(dbfd17d9) was reverted (a46f05c4) before any release, so no tag before
v53.1.0 is affected.
In callDownloadFile (cmd/mcpRunner.go), both path and dest come straight
from the tool arguments:
dest was passed directly to os.Create(dest) with no confinement — no
filepath.Clean, no base-directory containment, no rejection of absolute
paths or ../ traversal. Any path the process can write is reachable.path was concatenated onto the Hub API base URL with no allowlist, so any
Hub endpoint (including captured-traffic exports) is reachable.The tool originally issued the fetch with no authentication. The authentication
gap was addressed by the gated-Hub authentication refactor: the download now
forwards the operator's Hub credentials (ServiceAccount token / License-Key) and
rejects auth-required responses instead of writing a login page to disk. But
the Hub ships auth-disabled by default (community/dev), so on a default
kubeshark tap the Hub API answers without authentication and captured traffic
(credentials/tokens/PII) can still be read and exfiltrated end-to-end. Enforcing
Hub auth by default is tracked separately (gated-auth workstream) and is not
part of this advisory's fix.
Following the tool's documented workflow on a default community install:
export_snapshot_pcap → obtain a relative path → download_file with that
path and an attacker-chosen dest. The reporter retrieved a captured-traffic
PCAP and recovered a planted canary Authorization: Bearer … credential from
it, and demonstrated writing the fetched bytes to an arbitrary local path.
kubeshark mcp, as that user.Kubeshark scores this 5.3 Medium, down from the reporter's 7.1, on two metrics:
AV:N → AV:L. The vulnerable component has no network listener the
attacker reaches. kubeshark mcp is a local stdio MCP server; the attacker's
input arrives as content an agent running on that host ingests and then
replays into a local tool call. The delivery of the poisoned content may cross
a network, but the attack surface being exploited is local to the machine.I:H → I:L. The write is confined to paths writable by the user running
kubeshark mcp (normally unprivileged) — no system-file or other-user
modification. The attacker also controls where the bytes land, not what
they are: the body comes from a Hub API response, so the content is
constrained to what the Hub will emit. Reliable RCE was not demonstrated.A:L → A:N. Nothing in the issue degrades availability of the CLI, the
Hub, or the host; the original A:L is unsupported.Kubeshark kept C:H: on a default community install the Hub API answers
unauthenticated, so captured traffic (credentials, tokens, PII) is genuinely
readable end-to-end. Kubeshark kept AC:H (the attacker must land an injection in
content the agent ingests and know the deployment layout), PR:N
(download_file is registered unconditionally — no --allow-destructive
needed), UI:R (an operator must be driving an agent against
kubeshark mcp), and S:U (the impact stays within the local user's
authorization scope).
Changes in cmd/mcpRunner.go:
dest is resolved through secureDownloadDest and confined to a base
directory (the CWD by default, relocatable via KUBESHARK_MCP_DOWNLOAD_DIR);
a dest that resolves outside the base (via ../ or an absolute path) is
rejected.path is rejected if it contains .. segments.dest that is itself a symlink) cannot
redirect the write outside it; the file is opened with O_NOFOLLOW where the
platform provides it.kubeshark mcp as an unprivileged user in an isolated working directory.AUTH_ENABLED=true + an IdP/license) to close the
unauthenticated read path.path (current fix only rejects ..).This page as .md · .json · CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N
NVD data is provided by NIST and is public domain · GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.