CVE Catalog

CVE-2026-58196

MediumCVSS 4.7
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.38%

31th percentile - higher than 31% of all known CVEs

Summary

ToolHive prior to 0.31.0 has a vulnerability in remote authentication where the client trusts the MCP server for authentication discovery destinations, allowing a malicious server to issue GET requests to internal services (link-local, RFC1918, cloud metadata) outside the server's container. This can lead to data exfiltration or privilege escalation.

Risk Assessment

The organization may be exposed to leakage of sensitive data from internal services, including cloud metadata credentials, potentially leading to full infrastructure compromise.

Recommendation

Upgrade ToolHive to version 0.31.0 or later and restrict access to internal IP addresses for MCP clients.

Other vulnerabilities in ToolHive

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS