CVE-2025-59377
Python vulnerability analysis and mitigation

Overview

The CVE-2025-59377 vulnerability affects feiskyer mcp-kubernetes-server through version 0.1.11. This vulnerability allows OS command injection, even in read-only mode, via /mcp/kubectl because shell=True is used. The vulnerability is distinct from mcp-server-kubernetes and CVE-2025-53355 (NVD).

Technical details

The vulnerability is classified as CWE-78 (Improper Neutralization of Special Elements used in an OS Command). It has received a CVSS v3.1 Base Score of 9.8 (CRITICAL) from NIST with a vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. The vulnerability stems from the kubectl tool implementation which constructs shell commands by prepending 'kubectl' to user-provided input. While the validation logic checks the first element of the command, it fails to sanitize the rest of the input for shell metacharacters (CVE-Request).

Impact

The vulnerability allows an unauthenticated attacker with access to the MCP endpoint to achieve Remote Code Execution (RCE) on the server host under the privileges of the MCP server process. This can lead to complete system compromise, data theft, and potential access to the entire Kubernetes cluster and internal network (CVE-Request).

Mitigation and workarounds

The recommended mitigation involves rewriting the command.py module to avoid using shell=True with subprocess.run. Instead, commands and arguments should be passed as a list (e.g., subprocess.run(['kubectl', 'version', '--client'])). Additionally, all user-provided arguments must be strictly validated against an allow-list of known-safe kubectl subcommands and parameters, and command chaining metacharacters (&, |, ;, $, `) must be stripped or rejected (CVE-Request).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66471HIGH8.9
  • PythonPython
  • py3-urllib3
NoYesDec 05, 2025
CVE-2025-66418HIGH8.9
  • PythonPython
  • python-urllib3
NoYesDec 05, 2025
CVE-2025-65958HIGH8.5
  • PythonPython
  • cpe:2.3:a:openwebui:open_webui
NoYesDec 04, 2025
CVE-2025-56427HIGH7.5
  • PythonPython
  • composio
NoNoDec 04, 2025
CVE-2025-63681MEDIUM4.3
  • PythonPython
  • open-webui
NoNoDec 04, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management