CVE-2026-129235: Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path
Kubeshark is an eBPF-powered network observability tool for Kubernetes. From 53.1.0 until 53.4.0, the downloadfile tool in cmd/mcpRunner.go accepts caller-controlled path and dest values, fetches a selected Kubeshark Hub API response, and writes the returned bytes through os.Create(dest) in callDownloadFile without confining the destination. An attacker who influences arguments through an AI agent driving kubeshark mcp can write Hub-supplied bytes to any path writable by the local MCP user and can read captured network traffic from default auth-disabled Hub deployments. The tool is registered without --allow-destructive; reliable code execution is not demonstrated because the bytes are constrained to Hub API responses. Hub-side default authentication remains outside this remediation, so captured traffic can remain readable in default auth-disabled Hub deployments after the local destination-write fix. The destination-write issue is fixed in version 53.4.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Kubesharkto a version that resolves this vulnerability.Fixed in 53.4.0
Event History
Frequently Asked Questions
Who is exposed to the arbitrary destination write?
Deployments using Kubeshark versions 53.1.0 through versions before 53.4.0 are affected when an AI agent can invoke the kubeshark MCP download_file tool. The impact is limited to paths writable by the local user running the MCP service.
What must an attacker control to exploit this issue?
An attacker must be able to influence the path and dest arguments supplied through an AI agent driving kubeshark MCP. The written content is constrained to bytes returned by a selected Kubeshark Hub API response.
Are default deployments affected by the data-exposure aspect?
Default authentication-disabled Hub deployments can allow captured network traffic to be read. This Hub-side default authentication condition is outside the destination-write remediation and can remain after upgrading for the local write issue.
What is the remediation for the destination-write flaw?
Upgrade Kubeshark to version 53.4.0, which fixes the unconfined destination write. The download_file tool was previously registered without requiring --allow-destructive.