{"id":"CVE-2026-46519","aliases":["CVE-2026-46519","GHSA-cr22-wjx7-2w6m"],"related":[],"kind":"vulnerability","state":"published","title":"mcp-server-kubernetes Affected By Tool Access Control Bypass: Presentation-Layer Filtering Without Execution-Layer Enforcement","summary":"mcp-server-kubernetes is a Model Context Protocol server for Kubernetes cluster management. Prior to version 3.6.0, mcp-server-kubernetes exposes three environment variables (ALLOW_ONLY_READONLY_TOOLS, ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS, ALLOWED_TOOLS) documented as access controls for restricting which Kubernetes operations are available. These controls are enforced at the tool discovery layer (tools/list) but not at the execution layer (tools/call). Any client that knows a tool name can invoke it directly regardless of the configured restriction mode. The access control was effectively cosmetic. This issue has been patched in version 3.6.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"mcp-server-kubernetes is a Model Context Protocol server for Kubernetes cluster management. Prior to version 3.6.0, mcp-server-kubernetes exposes three environment variables (ALLOW_ONLY_READONLY_TOOLS, ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS, ALLOWED_TOOLS) documented as access controls for restricting which Kubernetes operations are available. These controls are enforced at the tool discovery layer (tools/list) but not at the execution layer (tools/call). Any client that knows a tool name can invoke it directly regardless of the configured restriction mode. The access control was effectively cosmetic. This issue has been patched in version 3.6.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\n`mcp-server-kubernetes` exposes three environment variables (`ALLOW_ONLY_READONLY_TOOLS`, `ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS`, `ALLOWED_TOOLS`) documented as access controls for restricting which Kubernetes operations are available. These controls are enforced at the tool discovery layer (`tools/list`) but not at the execution layer (`tools/call`). Any client that knows a tool name can invoke it directly regardless of the configured restriction mode. The access control was effectively cosmetic.\n\nFixed in v3.6.0.\n\n## Impact\n\nAn attacker or misconfigured AI agent with network access to the MCP server's HTTP endpoint could invoke any Kubernetes tool regardless of the restriction mode configured by the operator -- including `kubectl_delete`, `exec_in_pod`, `kubectl_generic`, and `node_management`.\n\nThe project explicitly supports and documents multi-client HTTP deployment scenarios (Streamable HTTP and SSE transports, in-cluster deployments, Codex CLI and Gemini CLI integrations). In these deployments, operators relied on the tool restriction env vars to enforce least-privilege access across users or roles. The bypass invalidated that model entirely.\n\nSeverity scales with the Kubernetes service account's permissions. In environments where the MCP server runs with `cluster-admin` (common in dev/staging), this is equivalent to full cluster compromise for any client that can reach the endpoint.\n\nThe `MCP_AUTH_TOKEN` / `X-MCP-AUTH` mechanism controls who can reach the endpoint but provides no per-tool authorization. An authenticated client restricted to `ALLOWED_TOOLS=kubectl_get` could still invoke `kubectl_delete` after authentication.\n\n## Root Cause\n\nIn `src/index.ts`, the `ListToolsRequestSchema` handler applied the configured filtering logic before returning available tools. The `CallToolRequestSchema` handler dispatched directly by tool name with no equivalent check -- every tool was reachable unconditionally.\n\n## Proof of Concept\n\nTested across all three restriction modes against a live kind cluster. In each case, `kubectl_delete` was absent from `tools/list` but executed successfully via a direct `tools/call` request:\n\n```shell\ncurl -s http://<HOST>:3003/mcp \\\n  -H 'Content-Type: application/json' \\\n  -H 'Accept: application/json, text/event-stream' \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"kubectl_delete\",\"arguments\":{\"resourceType\":\"pod\",\"name\":\"test-pod\",\"namespace\":\"default\"}}}'\n```\n\nResult: `{\"result\":{\"content\":[{\"type\":\"text\",\"text\":\"pod \\\"test-pod\\\" deleted\\n\"}]}}`\n\nConfirmed across `ALLOW_ONLY_READONLY_TOOLS=true`, `ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true`, and `ALLOWED_TOOLS=kubectl_get`.\n\n## Remediation\n\nThe fix applies the same filtering logic from `ListToolsRequestSchema` at the start of the `CallToolRequestSchema` handler, returning an error for any tool call outside the active allowed set. Fixed in v3.6.0.\n\n## Credit\n\nDiscovered by [Francisco Rosales](https://www.linkedin.com/in/francisco-rosales-celis/) of [Manifold Security](https://manifold.security), coordinated by [Ax Sharma](https://www.linkedin.com/in/axsharma/), Head of Research at Manifold Security.","format":"markdown","source":"ghsa"},{"lang":"es","text":"mcp-server-kubernetes es un servidor de Protocolo de Contexto de Modelo para la gestión de clústeres de Kubernetes. Antes de la versión 3.6.0, mcp-server-kubernetes expone tres variables de entorno (ALLOW_ONLY_READONLY_TOOLS, ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS, ALLOWED_TOOLS) documentadas como controles de acceso para restringir qué operaciones de Kubernetes están disponibles. Estos controles se aplican en la capa de descubrimiento de herramientas (tools/list) pero no en la capa de ejecución (tools/call). Cualquier cliente que conozca el nombre de una herramienta puede invocarla directamente independientemente del modo de restricción configurado. El control de acceso era efectivamente cosmético. Este problema ha sido parcheado en la versión 3.6.0.","source":"nvd"}],"published":"2026-05-21T20:33:46.000Z","modified":"2026-10-26T11:10:00.157Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":"< 3.6.0","status":"affected"}],"vendor":"Flux159","product":"mcp-server-kubernetes","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.6.0"}],"ecosystem":"npm","package":"mcp-server-kubernetes","purl":"pkg:npm/mcp-server-kubernetes","source":"ghsa"}],"references":[{"url":"https://github.com/Flux159/mcp-server-kubernetes/security/advisories/GHSA-cr22-wjx7-2w6m","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Flux159/mcp-server-kubernetes/releases/tag/v3.6.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46519","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Flux159/mcp-server-kubernetes","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-06-11T19:39:57.663Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46519","url":"https://www.cve.org/CVERecord?id=CVE-2026-46519","licence":"CVE Terms of Use","modified":"2026-06-11T19:40:22.771Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cr22-wjx7-2w6m","url":"https://github.com/advisories/GHSA-cr22-wjx7-2w6m","licence":"CC-BY-4.0","modified":"2026-06-12T19:30:11.497Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46519","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46519","licence":"Public domain","modified":"2026-10-26T11:10:00.157Z"}],"updatedAt":"2026-11-25T22:59:24.453Z","epss":{"score":0.00615,"percentile":0.50811,"date":"2026-12-01T12:00:22.000Z"}}