CVE-2025-59376: Mcp kubernetes server Mcp-kubernetes-server Has A Command Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-hjm5-xgj8-vwj6
CVSS 5.3
CWE-77
Published
Advisory Summary

CVE-2025-59376 is a MODERATE (CVSS 5.3) mcp-kubernetes-server has a command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Mcp kubernetes server libraries in the PyPI ecosystem. The issue involves mcp-kubernetes-server has a command injection vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2025-59376 at a Glance

CVE Identifier CVE-2025-59376
GHSA Identifier GHSA-hjm5-xgj8-vwj6
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Mcp kubernetes server
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-59376

To remediate this vulnerability, upgrade all affected Mcp kubernetes server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mcp-kubernetes-server fixed: Latest secure release
pip install mcp-kubernetes-server>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mcp-kubernetes-server

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-59376, inspect your installed packages using pip:

pip show mcp-kubernetes-server

Analyze the terminal output to locate any version of Mcp kubernetes server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show mcp-kubernetes-server command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Mcp kubernetes server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

`mcp-kubernetes-server` does not correctly enforce the `--disable-write` / `--disable-delete` protections when commands are chained. The server only inspects the first token to decide whether an operation is write/delete, which allows a read-like command to be followed by a write action using shell metacharacters (e.g., `kubectl version; kubectl delete pod <name>`). A remote attacker who can invoke the server may therefore bypass the intended write/delete restrictions and perform state-changing operations against the Kubernetes cluster. **Affected versions:** through `0.1.11` (no patched release available as of now). **Mitigations:** - Run with `--disable-kubectl` and/or `--disable-helm` to fully block those execution paths. - Put the server behind an allow-list proxy restricting allowed subcommands.

CVE-2025-59376 Affected Mcp kubernetes server Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
mcp-kubernetes-server
PyPI
≤ 0.1.11

References

Frequently Asked Questions

What is CVE-2025-59376?
CVE-2025-59376 is a security vulnerability in Mcp kubernetes server involving mcp-kubernetes-server has a Command Injection vulnerability under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Mcp kubernetes server versions are affected?
Affected versions include releases prior to current release patches across affected packages: mcp-kubernetes-server.
What version fixes CVE-2025-59376?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is mcp-kubernetes-server affected?
Yes, mcp-kubernetes-server is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2025-59376?
CVE-2025-59376 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2025-59376?
CVE-2025-59376 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2025-59376?
Run the dependency tree command: 'pip show mcp-kubernetes-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hjm5-xgj8-vwj6",
  "modified" : "2025-09-25T20:35:20Z",
  "published" : "2025-09-15T15:31:24Z",
  "aliases" : [ "CVE-2025-59376" ],
  "summary" : "mcp-kubernetes-server has a Command Injection vulnerability",
  "details" : "`mcp-kubernetes-server` does not correctly enforce the `--disable-write` / `--disable-delete` protections when commands are chained. The server only inspects the first token to decide whether an operation is write/delete, which allows a read-like command to be followed by a write action using shell metacharacters (e.g., `kubectl version; kubectl delete pod <name>`). A remote attacker who can invoke the server may therefore bypass the intended write/delete restrictions and perform state-changing operations against the Kubernetes cluster.\n\n**Affected versions:** through `0.1.11` (no patched release available as of now).\n\n**Mitigations:**\n- Run with `--disable-kubectl` and/or `--disable-helm` to fully block those execution paths.\n- Put the server behind an allow-list proxy restricting allowed subcommands.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mcp-kubernetes-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.1.11"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59376"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/feiskyer/mcp-kubernetes-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/feiskyer/mcp-kubernetes-server/blob/78957b6c1a3982080cf6fcaac6f6e9014116a71c/src/mcp_kubernetes_server/main.py#L106-L137"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/william31212/CVE-Requests-1896609"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-15T21:37:47Z",
    "nvd_published_at" : "2025-09-15T14:15:44Z"
  }
}