Skip to content
HighVulnerability

CVE-2026-39884: mcp-server-kubernetes argument injection in port_forward tool

Identifier
CVE-2026-39884
Published
Record updated
View JSON
Affected
  • mcp-server-kubernetes <= 3.4.0
Fixed in
3.5.0
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%

Summary

mcp-server-kubernetes, a Model Context Protocol server for Kubernetes cluster management, versions 3.4.0 and prior, contains an argument injection flaw (CVE-2026-39884) in the port_forward tool in src/tools/port_forward.ts. The tool builds a kubectl command by string concatenation and splits it on spaces before calling spawn(), so spaces in namespace, resourceType, resourceName, localPort and targetPort become argument boundaries. An attacker can inject arbitrary kubectl flags, such as --address=0.0.0.0 to expose internal Kubernetes services to the network or additional -n flags to target other namespaces, including through prompt injection against connected AI agents.

Mitigation

Fixed in 3.5.0.