CVE-2026-39884
HIGH 8.1CVSS 3.1MCP Server Kubernetes has an Argument Injection in port_forward tool via space-splitting
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.
- Published
- 15 Apr 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-88
- Also known as
- GHSA-4xqg-gf5c-ghwq
- Sources
- NVDJSONOSV GHSA-4xqg-gf5c-ghwqJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L |
| OSV | GitHub | CVSS 3.1 | HIGH 8.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | suyogs | mcp-server-kubernetescpe:2.3:a:suyogs:mcp-server-kubernetes:*:*:*:*:*:node.js:*:* |
< 3.5.0 | 3.5.0 |
| OSV | npm | mcp-server-kubernetes | < 3.5.0 | 3.5.0 |
References
- https://github.com/Flux159/mcp-server-kubernetes/releases/tag/v3.5.0 · Product, Release Notes, WEB
- https://github.com/Flux159/mcp-server-kubernetes/security/advisories/GHSA-4xqg-gf5c-ghwq · Mitigation, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-39884 · ADVISORY
- https://github.com/Flux159/mcp-server-kubernetes · PACKAGE
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 15 Apr 2026)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 14 Apr 2026)