CVE-2025-59376
Python vulnerability analysis and mitigation

Overview

CVE-2025-59376 affects feiskyer mcp-kubernetes-server through version 0.1.11. The vulnerability stems from insufficient validation of command inputs in the implementation of --disable-write and --disable-delete security controls. The server fails to properly handle chained commands, allowing attackers to bypass security restrictions by using commands like 'kubectl version; kubectl delete pod' where the first command (version) is not a write or delete operation (MITRE, NVD).

Technical details

The vulnerability exists due to improper command validation in the mcp-kubernetes-server's implementation. The server only validates the first word of a command string to ensure it starts with 'kubectl' but fails to properly validate the entire command chain. This allows attackers to bypass security controls by using shell metacharacters like semicolons (;) to chain multiple commands. The vulnerability has been assigned a CVSS v3.1 base score of 5.3 (MEDIUM) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N by NVD, while MITRE assigned a score of 3.7 (LOW) with vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N (NVD).

Impact

The vulnerability allows attackers to bypass security controls and execute unauthorized commands on the system. This can lead to unauthorized deletion of pods, modification of deployments, and potential remote code execution under the privileges of the MCP server process. The impact extends to potential system compromise, data theft, and could serve as a pivot point for attacking the entire Kubernetes cluster (MITRE).

Mitigation and workarounds

The recommended mitigation involves rewriting the command.py module to avoid using shell=True with subprocess.run. Commands 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. Command chaining metacharacters (&, |, ;, $, `) should be stripped or rejected (MITRE).

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-65896CRITICAL9.8
  • PythonPython
  • asyncmy
NoNoDec 02, 2025
CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 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