🇰🇷 한글 설명
ToolHive 0.31.0 미만 버전에서 MCP 서버의 인증 디스커버리 과정 중 리다이렉션 제한 및 내부 IP 차단 미흡으로 인해 발생하는 취약점입니다. 공격자가 제어하는 원격 MCP 서버가 악의적인 URL을 제공할 경우, 클라이언트가 내부 네트워크(RFC1918, link-local 등)로 GET 요청을 보내 AWS 메타데이터와 같은 민감한 정보를 탈취할 수 있습니다.
💡 쉬운 설명
사용자가 믿고 연결한 도구가 사실은 사용자의 내부 네트워크를 몰래 탐색하고 정보를 빼가는 통로로 악용될 수 있는 문제입니다. 공격자가 설정한 가짜 주소를 따라가다 보면 회사 내부 서버나 클라우드 설정 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
ToolHive is a utility designed to simplify the deployment and management of Model Context Protocol (MCP) servers. Prior to 0.31.0, remote.Handler.Authenticate in pkg/auth/remote/handler.go invokes discovery.DetectAuthenticationFromServer in pkg/auth/discovery/discovery.go, whose host-side HTTP clients trust remote-server-controlled authentication discovery destinations, follow redirects without host or scheme restrictions, and do not consistently block private addresses. A malicious or compromised remote MCP server can place a resource_metadata URL in WWW-Authenticate for ParseWWWAuthenticate to extract, after which FetchResourceMetadata, OIDC issuer discovery, and well-known discovery can issue GET requests to link-local, RFC1918, or other internal services outside the server's container. The user connects to a server that the user intends to use, but the server controls the internal destination; this path does not depend on the separate NAT64 guard omission because the affected clients did not invoke IsPrivateIP, and it differs from the DCR resolver path that already refused redirects. The demonstrated primitive reaches internal-only HTTP services and reachability or error oracles, and can retrieve AWS metadata credentials where IMDSv1 accepts an unauthenticated GET, while IMDSv2 and GCP metadata prerequisites are not satisfied by the demonstrated request. This vulnerability is fixed in 0.31.0.
📍 영향받는 시스템
ToolHive versions prior to 0.31.0
⚔️ 공격 벡터
악의적인 MCP 서버가 인증 디스커버리 과정에서 내부 네트워크 주소로 리다이렉트하도록 유도하여 내부 서비스에 접근
🛡️ 대응 방법
ToolHive를 0.31.0 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 0.31.0 미만(예: 0.30.x)이면 취약한 상태이며, 0.31.0 이상이면 안전합니다.
toolhive --version 2>/dev/null | grep -E '0\.[0-9]{2}\.'
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
💻 영향받는 소프트웨어
Security Management Server