{"vuln_id":"GHSA-gj7r-p794-hhq5","aliases":["CVE-2026-129235"],"description":"Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path","published_at":"2026-11-16T22:18:58Z","modified_at":"2026-11-16T22:30:03.907372Z","first_seen_at":"2026-11-21T19:15:20.238589Z","severity":"medium","severity_source":"ghsa","cvss_score":5.3,"cvss_vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N","cwe":["CWE-22","CWE-88"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-gj7r-p794-hhq5"},"matched_alias":null,"items":[{"id":10993,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-gj7r-p794-hhq5: Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path","summary":"Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path\n\n**Ecosystem / package:** Go — `github.com/kubeshark/kubeshark` (the `kubeshark`\nCLI, `kubeshark mcp` subcommand)\n**Affected component:** `cmd/mcpRunner.go`, MCP tool `download_file`\n**Affected versions:** `>= v53.1.0`, `< v53.4.0` (the flaw shipped with the\ntool's first release; v53.3.0 was the last affected release)\n**Patched version:** `v53.4.0`\n**Credit:** novice-22 (Urim), via private coordinated disclosure.\n\n## Summary\nThe `download_file` MCP tool fetches a caller-supplied `path` from the Kubeshark\nHub API and writes the response body to a caller-supplied `dest` on the local\nfilesystem with no validation of `dest`. An attacker who can influence the MCP\ntool arguments — e.g. via indirect prompt injection against an AI agent driving\n`kubeshark mcp` — can write attacker-controlled bytes to an arbitrary path\nwritable by the user running the MCP server (e.g. `~/.ssh/authorized_keys`,\n`~/.kube/config`, `~/.bashrc`), and can request arbitrary Hub API endpoints.\n`download_file` is registered unconditionally (available in the default,\nnon-`--allow-destructive` posture).\n\n## Introduced in\nCommit `eb7dc42b` — \"Add get_file_url and download_file MCP tools (#1853)\",\n2026-03-04 — first released in **v53.1.0** (`v53.1.0~1`). An earlier attempt\n(`dbfd17d9`) was reverted (`a46f05c4`) before any release, so no tag before\nv53.1.0 is affected.\n\n## Details\nIn `callDownloadFile` (`cmd/mcpRunner.go`), both `path` and `dest` come straight\nfrom the tool arguments:\n- `dest` was passed directly to `os.Create(dest)` with no confinement — no\n`filepath.Clean`, no base-directory containment, no rejection of absolute\npaths or `../` traversal. Any path the process can write is reachable.\n- `path` was concatenated onto the Hub API base URL with no allowlist, so any\nHub endpoint (including captured-traffic exports) is reachable.\n\n## Auth context (CWE-306 / CWE-200)\nThe tool originally issued the fetch with no authentication. The authentication\ngap was addressed by the gated-Hub authentication refactor: the download now\nforwards the operator's Hub credentials (ServiceAccount token / License-Key) and\nrejects auth-required responses instead of writing a login page to disk. **But**\nthe Hub ships auth-disabled by default (community/dev), so on a default\n`kubeshark tap` the Hub API answers without authentication and captured traffic\n(credentials/tokens/PII) can still be read and exfiltrated end-to-end. Enforcing\nHub auth by default is tracked separately (gated-auth workstream) and is **not**\npart of this advisory's fix.\n\n## Proof of concept (reporter, abridged)\nFollowing the tool's documented workflow on a default community install:\n`export_snapshot_pcap` → obtain a relative path → `download_file` with that\n`path` and an attacker-chosen `dest`. The reporter retrieved a captured-traffic\nPCAP and recovered a planted canary `Authorization: Bearer …` credential from\nit, and demonstrated writing the fetched bytes to an arbitrary local path.\n\n## Impact\n- **Integrity (local):** arbi\n\nAffected: Go:github.com/kubeshark/kubeshark\n\nFixed in: 0.0.2-0.20260812200004-a76a1920dc75\n\nReferences:\nhttps://github.com/kubeshark/kubeshark/security/advisories/GHSA-gj7r-p794-hhq5\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-129235\nhttps://github.com/kubeshark/kubeshark/pull/1957\nhttps://github.com/kubeshark/kubeshark/commit/a76a1920dc7587be700a17f1592f58a9512ad214\nhttps://github.com/kubeshark/kubeshark\nhttps://github.com/kubeshark/kubeshark/releases/tag/v53.4.0","url":"https://osv.dev/vulnerability/GHSA-gj7r-p794-hhq5","published_at":"2026-11-16T22:18:58Z","updated_at":"2026-11-16T22:30:03.907372Z","fetched_at":"2026-11-21T19:15:55.946355Z","severity":"medium","cvss_score":5.3,"epss":0.00185,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/kubeshark/kubeshark","vuln_id":"CVE-2026-129235","vuln_ids":["CVE-2026-129235","GHSA-GJ7R-P794-HHQ5"],"tags":["osv","go","fix-available"],"cluster_id":2400,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10993","html":"https://vulnwatch.ve1ve2.com/item/10993"}},{"id":2478,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-gj7r-p794-hhq5 / CVE-2026-129235: Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path","summary":"Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path\n\n**Ecosystem / package:** Go — `github.com/kubeshark/kubeshark` (the `kubeshark`\nCLI, `kubeshark mcp` subcommand)\n**Affected component:** `cmd/mcpRunner.go`, MCP tool `download_file`\n**Affected versions:** `>= v53.1.0`, `< v53.4.0` (the flaw shipped with the\ntool's first release; v53.3.0 was the last affected release)\n**Patched version:** `v53.4.0`\n**Credit:** novice-22 (Urim), via private coordinated disclosure.\n\n## Summary\nThe `download_file` MCP tool fetches a caller-supplied `path` from the Kubeshark\nHub API and writes the response body to a caller-supplied `dest` on the local\nfilesystem with no validation of `dest`. An attacker who can influence the MCP\ntool arguments — e.g. via indirect prompt injection against an AI agent driving\n`kubeshark mcp` — can write attacker-controlled bytes to an arbitrary path\nwritable by the user running the MCP server (e.g. `~/.ssh/authorized_keys`,\n`~/.kube/config`, `~/.bashrc`), and can request arbitrary Hub API endpoints.\n`download_file` is registered unconditionally (available in the default,\nnon-`--allow-destructive` posture).\n\n## Introduced in\nCommit `eb7dc42b` — \"Add get_file_url and download_file MCP tools (#1853)\",\n2026-03-04 — first released in **v53.1.0** (`v53.1.0~1`). An earlier attempt\n(`dbfd17d9`) was reverted (`a46f05c4`) before any release, so no tag before\nv53.1.0 is affected.\n\n## Details\nIn `callDownloadFile` (`cmd/mcpRunner.go`), both `path` and `dest` come straight\nfrom the tool arguments:\n- `dest` was passed directly to `os.Create(dest)` with no confinement — no\n`filepath.Clean`, no base-directory containment, no rejection of absolute\npaths or `../` traversal. Any path the process can write is reachable.\n- `path` was concatenated onto the Hub API base URL with no allowlist, so any\nHub endpoint (including captured-traffic exports) is reachable.\n\n## Auth context (CWE-306 / CWE-200)\nThe tool originally issued the fetch with no authentication. The authentication\ngap was addressed by the gated-Hub authentication refactor: the download now\nforwards the operator's Hub credentials (ServiceAccount token / License-Key) and\nrejects auth-required responses instead of writing a login page to disk. **But**\nthe Hub ships auth-disabled by default (community/dev), so on a default\n`kubeshark tap` the Hub API answers without authentication and captured traffic\n(credentials/tokens/PII) can still be read and exfiltrated end-to-end. Enforcing\nHub auth by default is tracked separately (gated-auth workstream) and is **not**\npart of this advisory's fix.\n\n## Proof of concept (reporter, abridged)\nFollowing the tool's documented workflow on a default community install:\n`export_snapshot_pcap` → obtain a relative path → `download_file` with that\n`path` and an attacker-chosen `dest`. The reporter retrieved a captured-traffic\nPCAP and recovered a planted canary `Authorization: Bearer …` credential from\nit, and demonstrated writing the fetched bytes to an arbitrary local path.\n\n## Impact\n- **Integrity (local):** arbi\n\nAffected packages: go:github.com/kubeshark/kubeshark\nPatched: github.com/kubeshark/kubeshark 0.0.2-0.20260812200004-a76a1920dc75","url":"https://github.com/advisories/GHSA-gj7r-p794-hhq5","published_at":"2026-11-16T22:18:58Z","updated_at":"2026-11-16T22:18:58Z","fetched_at":"2026-11-21T19:15:18.416869Z","severity":"medium","cvss_score":5.3,"epss":0.00185,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/kubeshark/kubeshark","vuln_id":"CVE-2026-129235","vuln_ids":["CVE-2026-129235","GHSA-GJ7R-P794-HHQ5"],"tags":["ghsa","go","CWE-22","CWE-88"],"cluster_id":2400,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2478","html":"https://vulnwatch.ve1ve2.com/item/2478"}},{"id":6192,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-129235: Kubeshark is an eBPF-powered network observability tool for Kubernetes. From 53.1.0 until 53.4.0, the download_file tool in cmd/mcpRunner.go accepts caller-con…","summary":"Kubeshark is an eBPF-powered network observability tool for Kubernetes. From 53.1.0 until 53.4.0, the download_file 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.\n\nReferences:\nhttps://github.com/kubeshark/kubeshark/commit/a76a1920dc7587be700a17f1592f58a9512ad214\nhttps://github.com/kubeshark/kubeshark/pull/1957\nhttps://github.com/kubeshark/kubeshark/releases/tag/v53.4.0\nhttps://github.com/kubeshark/kubeshark/security/advisories/GHSA-gj7r-p794-hhq5","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-129235","published_at":"2026-11-16T17:17:31.153000Z","updated_at":"2026-11-16T19:17:39.907000Z","fetched_at":"2026-11-21T19:15:31.481962Z","severity":"medium","cvss_score":5.3,"epss":0.00185,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-129235","vuln_ids":["CVE-2026-129235","GHSA-GJ7R-P794-HHQ5"],"tags":["CWE-88"],"cluster_id":2401,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/6192","html":"https://vulnwatch.ve1ve2.com/item/6192"}}]}