CVE-2026-39884
High · 8.3CVSS
8.3
EPSS
0.4%
Published
Apr 15, 2026
CISA due date
—
The record
mcp-server-kubernetes is a Model Context Protocol server for Kubernetes cluster management. Versions 3.4.0 and prior contain an argument injection vulnerability in the port_forward tool in src/tools/port_forward.ts, where a kubectl command is constructed via string concatenation with user-controlled input and then naively split on spaces before being passed to spawn(). Unlike all other tools in the codebase which correctly use array-based argument passing with execFileSync(), port_forward treats every space in user-controlled fields (namespace, resourceType, resourceName, localPort, targetPort) as an argument boundary, allowing an attacker to inject arbitrary kubectl flags. This enables exposure of internal Kubernetes services to the network by injecting --address=0.0.0.0, cross-namespace targeting by injecting additional -n flags, and indirect exploitation via prompt injection against AI agents connected to the MCP server. This issue has been fixed in version 3.5.0.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | mcp-server-kubernetes | 0 | 3.5.0 |
Related vulnerabilities
- GHSA-4xqg-gf5c-ghwq MCP Server Kubernetes has an Argument Injection in port_forward tool via space-splitting Same vulnerability
- CVE-2026-47250 mcp-server-kubernetes is a Model Context Protocol server for Kubernetes cluster… Also affects mcp-server-kubernetes
- CVE-2026-46519 mcp-server-kubernetes is a Model Context Protocol server for Kubernetes cluster… Also affects mcp-server-kubernetes
- GHSA-6mx4-4h42-r8vh MCP Server Kubernetes: kubectl-generic flag injection enables Kubernetes bearer token… Also affects mcp-server-kubernetes
- GHSA-cr22-wjx7-2w6m MCP Server Kubernetes: Tool Access Control Bypass via Presentation-Layer Filtering… Also affects mcp-server-kubernetes
- GHSA-wvxp-jp4w-w8wg mcp-server-kubernetes has potential security issue in exec_in_pod tool Also affects mcp-server-kubernetes
- CVE-2025-66404 mcp-server-kubernetes has potential security issue in exec_in_pod tool Also affects mcp-server-kubernetes
- CVE-2025-54073 mcp-package-docs is an MCP (Model Context Protocol) server that provides LLMs with… Also affects mcp-server-kubernetes