Kubeshark fixes MCP download_file arbitrary file write vulnerability, triggerable via indirect prompt injection
Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path
Kubeshark's MCP tool download_file has an arbitrary file write vulnerability because it does not validate the target path; the flaw was introduced in commit eb7dc42 and fixed in commit a76a192. An attacker able to influence MCP tool parameters (for example through indirect prompt injection against an agent driving kubeshark mcp) can write bytes to any path writable by the running user and can request any Hub API endpoint. The Hub disables authentication by default, and under the default installation, credentials, tokens and PII in captured traffic can be read end to end; the reporter recovered a pre-planted Bearer credential from a captured PCAP. Kubeshark rated the severity as 5.3 Medium (the reporter's original rating was 7.1), and reliable RCE was not demonstrated. The fix restricts the download target to the base directory and rejects ../ and absolute paths; mitigation recommendations include running as a non-privileged user, avoiding untrusted content or agent input, and enabling Hub authentication.
Indirect prompt injection can achieve arbitrary file write through unvalidated MCP tool parameters, so teams deploying MCP servers can use this to check path validation in download-type tools.