NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2026-46519: MCP Server Kubernetes: Tool Access Control Bypass via Presentation-Layer Filtering Without Execution-Layer Enforcement

highCVSS 3.1 8.8GHSA-cr22-wjx7-2w6m

In `mcp-server-kubernetes` before 3.6.0, the tool restriction settings only hide tools from the list. They do not block calls. Any client that knows a tool name can run `kubectl_delete` or `exec_in_pod` even when the operator set read-only mode. Upgrade to 3.6.0.

Published May 21, 2026 · Updated Jun 12, 2026 · Analysis Oct 26, 2026

What an attacker can do

The server documents three environment variables as access controls: ALLOW_ONLY_READONLY_TOOLS, ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS and ALLOWED_TOOLS. In src/index.ts, the ListToolsRequestSchema handler filtered the tools it returned. The CallToolRequestSchema handler dispatched by tool name with no matching check (CWE-863). The restriction was cosmetic.

The advisory's proof of concept sends one tools/call request for kubectl_delete to the /mcp endpoint. The tool was missing from tools/list but still deleted the pod. It worked under all three restriction modes.

The attacker needs network access to the HTTP endpoint (Streamable HTTP or SSE) and, if configured, the MCP_AUTH_TOKEN. That token only controls who can connect. It gives no per-tool authorization, so a client limited to ALLOWED_TOOLS=kubectl_get could still call kubectl_delete. The same applies to a misconfigured or prompt-injected AI agent that is attached to the server.

The damage scales with the Kubernetes service account. The advisory names kubectl_delete, exec_in_pod, kubectl_generic and node_management as reachable. Where the server runs as cluster-admin, which is common in dev and staging, this equals full cluster compromise.

Who is affected

The mcp-server-kubernetes npm package before 3.6.0, in any deployment that relies on ALLOW_ONLY_READONLY_TOOLS, ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS or ALLOWED_TOOLS to limit what clients can do. Multi-client HTTP deployments are the main exposure, including in-cluster setups. Check:

npm ls mcp-server-kubernetes

For a server run with npx, check the version your launch command resolves. Also review which Kubernetes permissions the server's service account or kubeconfig has.

mcp-server-kubernetes

Ecosystem
npm
Affected
< 3.6.0
Fixed in
3.6.0
Check
npm ls mcp-server-kubernetes

How to fix it

Upgrade to mcp-server-kubernetes 3.6.0:

npm install [email protected]

The fix applies the same filtering logic from ListToolsRequestSchema at the start of the CallToolRequestSchema handler. A call to a tool outside the active allowed set now returns an error.

The advisory gives no other workaround. Because the restriction variables were not enforced before, do not count on them as protection in older versions. Reduce the service account's RBAC permissions to what the server needs, and keep the endpoint reachable only by trusted clients.

How to tell if you were hit

Look in the MCP server logs and Kubernetes audit logs for tools/call requests to kubectl_delete, exec_in_pod, kubectl_generic or node_management from clients that should be read-only. Compare the tools called against the tools you allowed in ALLOWED_TOOLS. In the Kubernetes audit log, check the server's service account for delete, exec and node operations you did not expect. Beam records agent MCP tool calls, and its rules can flag risky ones, which covers an agent calling a tool it was not meant to use.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

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.

Fixed in v3.6.0.

Impact

An 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.

The 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.

Severity 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.

The 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.

Root Cause

In 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.

Proof of Concept

Tested 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:

curl -s http://<HOST>:3003/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"kubectl_delete","arguments":{"resourceType":"pod","name":"test-pod","namespace":"default"}}}'

Result: {"result":{"content":[{"type":"text","text":"pod \"test-pod\" deleted\n"}]}}

Confirmed across ALLOW_ONLY_READONLY_TOOLS=true, ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true, and ALLOWED_TOOLS=kubectl_get.

Remediation

The 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.

Credit

Discovered by Francisco Rosales of Manifold Security, coordinated by Ax Sharma, Head of Research at Manifold Security.

Credited to axsharma, 0xmagic0.

Questions

Did ALLOW_ONLY_READONLY_TOOLS actually block write tools before 3.6.0?

No. It only removed them from tools/list. A direct tools/call for kubectl_delete ran anyway, as the advisory's test against a live cluster showed.

Does MCP_AUTH_TOKEN protect against this?

Only partly. It controls who can reach the endpoint but gives no per-tool authorization, so an authenticated client could still call tools outside its allowed set.

Which version fixes CVE-2026-46519?

mcp-server-kubernetes 3.6.0. The tools/call handler now applies the same filter as tools/list.

How bad is it?

It depends on the Kubernetes permissions of the server's service account. With cluster-admin, the advisory calls it equivalent to full cluster compromise for any client that can reach the endpoint.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries