This release includes 5 security fixes for security teams reviewing exposed deployments.
Published 4mo
MCP Developer Tools
✓ No known CVEs patched
This release patches 5 known CVEs
Topics
ai
deployment
devops
genai
kubernetes
kubernetes-tools
+5 more
llms
mcp
mcp-server
npm
pypi
Affected surfaces
rce_ssrf
breaking_upgrade
Summary
AI summaryFixed command injection vulnerability in port-forward by replacing os.system() with subprocess.Popen using list arguments.
Full changelog
Changes
Security Fixes
- Fixed
os.system()command injection innetworking.pyport-forward — replaced withsubprocess.Popenusing list args - Fixed temp file leak in
kubectl_apply— wrappedos.unlinkintry/finally - Fixed
command.split()inkind_node_exec— replaced withshlex.split() - Added non-destructive guard to
exec_in_podandport_forward - Restricted
kubectl_genericallowlist —configlimited to safe subcommands,authlimited tocan-i - Fixed hardcoded version string in HTTP handler
DRY Consolidation
- Consolidated
_get_kubectl_context_argsfrom 10 duplicate implementations to single source ink8s_config.py - Extracted shared Helm repo add/update helper
- Created
_cli_utils.pywith cached CLI availability checks and common subprocess runner - Standardized non-destructive mode patterns across all tool files
Dead Code Removal
- Removed unused imports across 7 files
- Removed unused
check_safety_modedecorator andis_operation_allowedfunction fromsafety.py - Removed auto-pip-install antipattern from
mcp_server.py
Code Quality
- Fixed bare
except:clauses innetworking.pyandcost.py - Fixed
Nonevalues in pod recommendations list - Proper exception chaining with
from errin FastMCP import - Updated test suite: 469 tests passing
Install
pip install kubectl-mcp-server==1.23.1
# or
npx [email protected]
Security Fixes
- Fixed `os.system()` command injection in `networking.py` port-forward — replaced with `subprocess.Popen` using list args
- Fixed temp file leak in `kubectl_apply` by wrapping `os.unlink` in `try/finally`
- Fixed insecure `command.split()` usage in `kind_node_exec` — replaced with `shlex.split()`
- Added non-destructive guard to `exec_in_pod` and `port_forward`
- Restricted `kubectl_generic` allowlist: `config` limited to safe subcommands, `auth` limited to `can-i`
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About rohitg00/kubectl-mcp-server
A Model Context Protocol (MCP) server for Kubernetes that enables AI assistants like Claude, Cursor, and others to interact with Kubernetes clusters through natural language.
Related context
Beta — feedback welcome: [email protected]