🔍 CVE-2026-39884

8.3
CVSS Score
HIGH
2026-04-15
2026-10-26 22:10
✅ 완료

🇰🇷 한글 설명

mcp-server-kubernetes 3.4.0 이하의 port_forward 도구에서 사용자 입력을 안전하지 않은 방식으로 처리하여 임의의 kubectl 플래그를 주입할 수 있는 취약점입니다. 공격자는 --address=0.0.0.0 주입으로 내부 서비스를 외부에 노출하거나 추가 -n 플래그로 크로스 네임스페이스 접근을 수행할 수 있습니다.

💡 쉬운 설명

Kubernetes 관리 도구에서 명령어를 구성할 때 사용자 입력을 검증 없이 그대로 사용하여, 악의적 문자를 포함한 입력으로 원치 않은 명령어가 실행될 수 있습니다. 이를 통해 내부 서비스가 외부에 노출되거나 보안 경계를 우회할 수 있습니다.

🇺🇸 원문 (English)

mcp-server-kubernetes is a Model Context Protocol server for Kubernetes cluster management. Versions 3.4.0 and prior contain an argument injection vulnerability in the port_forward tool in src/tools/port_forward.ts, where a kubectl command is constructed via string concatenation with user-controlled input and then naively split on spaces before being passed to spawn(). Unlike all other tools in the codebase which correctly use array-based argument passing with execFileSync(), port_forward treats every space in user-controlled fields (namespace, resourceType, resourceName, localPort, targetPort) as an argument boundary, allowing an attacker to inject arbitrary kubectl flags. This enables exposure of internal Kubernetes services to the network by injecting --address=0.0.0.0, cross-namespace targeting by injecting additional -n flags, and indirect exploitation via prompt injection against AI agents connected to the MCP server. This issue has been fixed in version 3.5.0.

📍 영향받는 시스템

mcp-server-kubernetes 버전 3.4.0 이하

⚔️ 공격 벡터

namespace, resourceType, resourceName, localPort, targetPort 필드에 kubectl 플래그를 주입하여 명령어 조작

🛡️ 대응 방법

mcp-server-kubernetes를 3.5.0 이상으로 업그레이드

🔧 검증 코드

3.5.0 이상이면 안전하고, 3.4.0 이하면 즉시 업그레이드 필요

Shell / Script
npm list mcp-server-kubernetes 2>/dev/null | grep mcp-server-kubernetes | awk '{print $2}'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

💻 영향받는 소프트웨어

Kubernetes