CVE-2026-130007을 재현하는 차등 실험실로, k8s-mcp-server의 SSE 전송을 통한 인증되지 않은 MCP tools/call을 다루며, 취약 빌드와 패치된 빌드를 대조군으로 고정합니다.
GHSA-m932-63jc-4jqq
/ CVE-2026-130007에 대한 차등 실험실: k8s-mcp-server
<= 1.0.25는 기본 SSE 전송을 0.0.0.0:8080에서 인증 없이,
세션 토큰 검증 없이, Origin 검사 없이 실행합니다. GET /sse는 누구에게나 상관 관계
sessionId을 발급하며, POST /message?sessionId=...는 서버의 Kubernetes 클러스터 권한으로 MCP tools/call
요청을 디스패치합니다. 읽기 전용 모드는 기본적으로 꺼져 있어,
등록된 도구 집합에는 deleteResource, helmUninstall,
rolloutRestart 등이 포함됩니다. CWE-306. CVSS 4.0 7.9
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H. 1.1.0에서 패치되었습니다.
RESULT vuln-build pass k8s-mcp-server v1.0.25 commit=64421d06eb05
RESULT fixed-build pass k8s-mcp-server v1.1.0 commit=3e4f918103ed
RESULT vuln-bind pass LISTEN *:18099 - all interfaces, no auth option exists
RESULT vuln/sse-noauth pass GET /sse 200, sessionId minted with zero auth headers
RESULT vuln/initialize pass POST /message HTTP 202
RESULT vuln/tools-list pass POST /message HTTP 202
RESULT vuln/origin-ignored pass POST with Origin: https://evil.example HTTP 202
RESULT vuln/write-tools pass 22 tools enumerated, write tools: createResource, createResourceYAML, deleteResource, helmInstall, helmRollback, helmUninstall, helmUpgrade, rolloutRestart
RESULT vuln/tools-call pass handler executed: in-handler cluster error 'dial tcp 127.0.0.1:1 connection refused' - RPC passed every gate
RESULT fixed-failclosed pass refuses to start: 'MCP_AUTH_TOKEN must contain at least 32 characters for HTTP transports'
RESULT fixed-401 pass GET /sse HTTP 401 (unauthorized), POST /message HTTP 401
SUCCESS CVE-2026-130007 k8s-mcp-server missing-auth-on-sse unauthenticated tools/call dispatched to the Kubernetes tool handler on the vulnerable build; the patched build fails closed without a token and answers 401 without one
macOS arm64, Go 1.27.4, Python 3.14에서 기록되었습니다. Docker 없음, 클러스터 없음.
tools/call getAPIResources을 더미 비라우팅 클러스터
(KUBERNETES_SERVER=https://127.0.0.1:1)에 대해 실행하면 HTTP 202를 반환한 뒤, SSE
스트림을 통해 JSON-RPC 오류 failed to retrieve API resources: Get "https://127.0.0.1:1/api"...: dial tcp 127.0.0.1:1: connect: connection refused를 반환합니다.
그 오류 텍스트가 바로 증거입니다. 인증 게이트는 핸들러가 실행되기 전에 HTTP 계층에서 401/403으로 응답합니다. 디스패치된 RPC는 도구 핸들러에 도달하고, 그 핸들러는 자신의 클러스터 연결에서 실패합니다. 이는 실험실이 관찰한 것과 정확히 일치합니다. 해당 RPC는 서버가 가진 모든 게이트를 통과했습니다. 실제 kubeconfig가 있으면 동일한 요청이 실제 클러스터 데이터를 반환합니다. 실험실은 어떤 클러스터에도 연결하지 않습니다.
v1.0.25,
v1.1.0)로부터 두 바이너리를 빌드하며, 컴파일 전에 각 태그의 커밋을 검증합니다. 바이너리 동일성은
런타임에 go version -m를 통해 다시 확인됩니다.LISTEN *:PORT), 자격 증명 없이 적대적인 Origin 헤더를 사용하여
네트워크를 통해 완전한 MCP 세션을 구동합니다: initialize,
notifications/initialized, tools/list, tools/call.MCP_AUTH_TOKEN이 없는 1.1.0은
HTTP 모드에서 아예 시작을 거부하며(실패 시 차단), 토큰이 있는 1.1.0은 인증되지 않은 요청에
401 Unauthorized(WWW-Authenticate: Bearer)로 응답합니다.python3 cve-2026-130007-k8smcp-sse-noauth-Abraxas-Labs.py
또는 직접:
cd lab && ./run.sh
Go(brew install go), git, curl, lsof가 필요합니다. 첫 실행 시 업스트림 저장소를
클론하고 두 버전을 모두 컴파일합니다(약 1분 소요). 클러스터 대상은 항상
라우팅 불가능한 https://127.0.0.1:1이며, 어떤 클러스터에도 아무것도 전송되지 않습니다.
HTTP 전송 시 MCP_AUTH_TOKEN(32자 이상)를 요구하고, Origin을 검증하며,
기본적으로 127.0.0.1에 바인딩하고 stdio를 기본값으로 사용하는
1.1.0으로 업그레이드하십시오. 업그레이드할 수 없다면: 포트를 방화벽으로 차단하거나,
stdio 모드를 실행하거나, 인증 프록시를 앞단에 두십시오. 쓰기 작업이 필요하지 않다면
읽기 전용 모드를 켜십시오.