{"cve":"CVE-2026-39884","nvd":{"published":"2026-04-15T04:17:37.097","modified":"2026-10-26T22:10:00.163","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1},"cwes":["CWE-88"],"references":["https://github.com/Flux159/mcp-server-kubernetes/releases/tag/v3.5.0","https://github.com/Flux159/mcp-server-kubernetes/security/advisories/GHSA-4xqg-gf5c-ghwq","https://github.com/Flux159/mcp-server-kubernetes/security/advisories/GHSA-4xqg-gf5c-ghwq"],"products":["suyogs:mcp-server-kubernetes"],"source":"nvd","synced_at":"2026-10-26T22:26:44.656832877+00:00"},"epss":{"cve":"CVE-2026-39884","score":0.00258,"percentile":0.173,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-4xqg-gf5c-ghwq","url":"https://osv.dev/vulnerability/GHSA-4xqg-gf5c-ghwq","summary":"MCP Server Kubernetes has an Argument Injection in port_forward tool via space-splitting","modified":"2026-04-15T21:34:35.875485Z","packages":[{"ecosystem":"npm","name":"mcp-server-kubernetes","purl":"pkg:npm/mcp-server-kubernetes","ranges":["<3.5.0"],"fixed":["3.5.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}