CVE-2026-39884

MCP Server Kubernetes has Argument Injection in its port_forward tool via space-splitting

HIGH
8.1
CVSS Score
Published: April 14, 2026 at 11:25 PM UTC
Updated: October 26, 2026 at 10:10 PM UTC
2 products affected across 2 vendorsMcp Server KubernetesMcp Server Kubernetes

Using mcp-server-kubernetes by Flux159?

Get instant alerts when new vulnerabilities affect mcp-server-kubernetes - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.1
Exploit prediction
EPSS 0.3%
SSVC
PoC

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 3.5.0
Affected range stops below 3.5.0, so it looks safe — our inference, not a vendor statement
v < 3.5.0
Affected range stops below 3.5.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

x_refsource_CONFIRMMitigationVendor Advisory
Source: cverecord
https://github.com/Flux159/mcp-server-kubernetes/security/advisories/GHSA-4xqg-gf5c-ghwq
x_refsource_MISCProductRelease Notes
Source: cverecord
https://github.com/Flux159/mcp-server-kubernetes/releases/tag/v3.5.0

SSVC — Action Prioritization

SSVCPoCNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-88

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card