# CVE-2026-39884: MCP Server Kubernetes has Argument Injection in its port_forward tool via space-splitting

- Severity: High 8.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-14T22:32:15.000Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-4xqg-gf5c-ghwq
- Weaknesses: CWE-88
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- Flux159 mcp-server-kubernetes: < 3.5.0
- mcp-server-kubernetes (npm): before 3.5.0
- suyogs mcp-server-kubernetes: before 3.5.0

## Every score

- GitHub_M: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L`
- GitHub: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L`
- NVD: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`

## References

- <https://github.com/Flux159/mcp-server-kubernetes/security/advisories/GHSA-4xqg-gf5c-ghwq> (exploit, mitigation, vendor-advisory, web)
- <https://github.com/Flux159/mcp-server-kubernetes/releases/tag/v3.5.0> (product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-39884> (advisory)
- <https://github.com/Flux159/mcp-server-kubernetes> (package)

## Sources

- CVE List: [CVE-2026-39884](https://www.cve.org/CVERecord?id=CVE-2026-39884), CVE Terms of Use, modified 2026-04-15
- GitHub Advisory Database: [GHSA-4xqg-gf5c-ghwq](https://github.com/advisories/GHSA-4xqg-gf5c-ghwq), CC-BY-4.0, modified 2026-04-15
- NVD: [CVE-2026-39884](https://nvd.nist.gov/vuln/detail/CVE-2026-39884), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-39884 · Whole record: https://cve.day/CVE-2026-39884.json · Rebuilt by cve.day 2026-11-25T22:59:18.812Z
