CVE-2026-58196
Received Received - Intake

SSRF in ToolHive MCP Server via Malicious Redirects

Vulnerability report for CVE-2026-58196, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-15

Last updated on: 2026-09-15

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-15
Last Modified
2026-09-15
Generated
2026-09-15
AI Q&A
2026-09-15
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
stacklok toolhive to 0.31.0 (exc)
toohive toolhive 0.31.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-918 The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

ToolHive before 0.31.0 has an issue where its remote authentication handler trusts server-controlled destinations for authentication discovery. It follows redirects without restrictions and does not block requests to private network addresses. A malicious MCP server can trick the client into making HTTP requests to internal services, potentially exposing sensitive data like AWS metadata credentials.

Impact Analysis

If you use ToolHive before 0.31.0, a compromised or malicious MCP server could cause your client to send requests to internal network services. This could lead to unauthorized access to sensitive information such as AWS metadata credentials, internal service errors, or network reconnaissance.

Mitigation Strategies

Upgrade ToolHive to version 0.31.0 or later to address the vulnerability in remote.Handler.Authenticate and discovery.DetectAuthenticationFromServer.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-58196. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart