llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/reza-gholizade/k8s-mcp-server

GHSA-M932-63JC-4JQQ

k8s-mcp-server: Missing authentication on default SSE/HTTP transport allows unauthenticated Kubernetes tool execution

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión1.1.0
Exposición7 hDesde la divulgación, 19 nov 2026, 5:48 p. m.
Detección33 minDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
05:48 p. m.
06:00 p. m.
01:02 a. m.
05:48 p. m.
07:36 p. m.
09:25 p. m.
11:13 p. m.
01:02 a. m.
FechaFaseEventoDetalle
Divulgación Publicada GHSA-M932-63JC-4JQQ divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

## Summary
When k8s-mcp-server runs in its default SSE transport mode, the MCP `tools/call`
endpoint is dispatched with no authentication, session token, or Origin check.
Any client that can reach the listening port can enumerate and invoke the
server's Kubernetes tools (including destructive/write tools) without credentials,
executing with the server's configured cluster privileges.

## Affected
Commit be87a6dd72bb6ec1d4886b8548843b99a4638b12 (Merge PR #130)
MCP library: github.com/mark3labs/mcp-go v0.57.0
Default mode: sse (SERVER_MODE default), default port 8080, bind 0.0.0.0

## Root cause (static trace: handleSSE -> handleMessage -> tools/call)
- main.go L129: `server.NewSSEServer(s)` is created with no auth option and no
contextFunc; L130 `sse.Start(":"+port)` binds all interfaces (0.0.0.0).
- mcp-go sse.go handleSSE (GET /sse): no auth header check; the server mints a
sessionId for any caller. The sessionId is a correlation value, not a credential.
- handleMessage (POST /message): the only gates are method==POST and a loadable
sessionId. No Authorization/Bearer/token/Origin/CSRF check before
`s.server.HandleMessage(ctx, rawMessage)` dispatches to the tools/call handler.
- Only `Access-Control-Allow-Origin: *` is present (CORS relaxation, not auth).
Write tools (Create/Delete/RolloutRestart, Helm Install/Upgrade/Uninstall/Rollback)
are all registered unless `-read-only` is set (default readOnly=false).

## Runtime reproduction (no auth headers on any request)
Started: `k8s-mcp-server -mode sse -port 8080` with a dummy non-routable
KUBERNETES_SERVER=https://127.0.0.1:1 (no real cluster touched).

GET /sse -> HTTP 200; server mints /message?sessionId=93b3...
POST /message initialize -> HTTP 202; result returned over SSE
POST /message tools/list -> HTTP 202; FULL tool list returned (incl. destructive)
POST /message tools/call getAPIResources -> HTTP 202; handler EXECUTED:
error -32603 "... Get https://127.0.0.1:1/api...: dial tcp 127.0.0.1:1: connect"

The tools/call response is NOT HTTP 401/403 but an in-handler cluster-connection
error, proving the RPC passed any authorization gate and reached the
getAPIResources handler. With a valid kubeconfig, the same path returns real
cluster data. `ss -ltnp` confirms LISTEN *:8080 (all interfaces, externally exposed).

## Impact
An unauthenticated attacker with network reach to the port can enumerate tools and
invoke Kubernetes operations with the server's privileges — cluster read and,
with default readOnly=false, state-changing operations (Create/Delete/Helm).
CWE-306 (Missing Authentication for Critical Function).

## Why this is a defect, not by-design
Default mode is HTTP (sse) on 0.0.0.0:8080, containerized deployment is the normal
scenario, and there is no "trusted client only" / auth-required note in the docs.
MCP HTTP transports are expected to be loopback-only or gated; this one is neither.

## Suggested fix
- Add an authorization gate before tools/call on the HTTP transports: e.g.
WithSSEContextFunc to validate an Authorization bearer/token, or fail-closed
when no token is configured in HTTP mode.
- Default the bind to 127.0.0.1 and require explicit opt-in for external binding.
- Document that HTTP mode must sit behind an authenticating proxy; recommend STDIO
by default.

Reproduction was done against the actual built binary and the shipped SSE path
(not an extract).

## Credit
bebold6133

Versiones

Rangos afectados

Afectada Corregida
github.com/reza-gholizade/k8s-mcp-server< 1.1.0
1.1.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Gogithub.com/reza-gholizade/k8s-mcp-server
Corregida 1.1.0 — —
Versiones corregidas1.1.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-130007
Otrahttps://github.com/reza-gholizade/k8s-mcp-server/security/advisories/GHSA-m932-63jc-4jqq
Otrahttps://github.com/reza-gholizade/k8s-mcp-server/issues/131
Otrahttps://github.com/reza-gholizade/k8s-mcp-server/pull/134
Otrahttps://github.com/reza-gholizade/k8s-mcp-server/commit/817d81005369837e0c034962785851ca4dec9a76
Otrahttps://github.com/reza-gholizade/k8s-mcp-server
Otrahttps://github.com/reza-gholizade/k8s-mcp-server/releases/tag/v1.1.0

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.