mcp-cve-project

CVE-2026-58196 | ToolHive: SSRF in remote MCP server authentication discovery (host-side, bypasses container isolation) | Medium |

CVE Information

Field Value
CVE / NVD CVE-2026-58196
Date (index) 2026-09-15
Affected product (index) ToolHive: SSRF in remote MCP server authentication discovery (host-side, bypasses container isolation)
GHSA ID GHSA-pr64-jmmf-jp54
OWASP MCP Top 10 (2025) MCP05 — Command Injection & Execution
Published / disclosed 2026-09-15
Ecosystem Source repository
Component stacklok/toolhive
EPSS score 0.004290000 (FIRST EPSS, 2026-11-09)
CVSS score 4.7 MEDIUM CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
CWE CWE-918
Affected versions < 0.31.0
Fixed versions None named in the published CVE record
Fix status No fixed version in the published CVE record
Exploit status Public advisory. This note does not include exploit steps.
Notes Updated on 2026-11-09 from the published CVE record and FIRST EPSS.

CVE Breakdown


What is the vulnerability?

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

Attack prerequisites / exposure

Depends on deployment. Typical MCP cases are a reachable HTTP or SSE listener, a malicious remote MCP server, a poisoned project configuration, or a person opening attacker-influenced content. Developer workstations and shared runners are high-value when the server runs with host access.

CVE is because of what bug?

The published weakness mapping is CWE-918. Use the linked advisory for the upstream root cause.

MCP-specific impact / why it matters

MCP connects a model to tools, files, and credentials on a host or network. A flaw in transport checks, path checks, command handling, or token binding can become code execution, credential exposure, or access to another user’s session.

Where was the bug? (source + snippet)

File and function names belong in the linked upstream advisory and patch. This index does not repeat exploit inputs.

Fix / Remediation

Apply the vendor’s patched release or commit. Until then, keep the affected MCP listener off untrusted networks and require authentication on HTTP transports.

Upstream fix (open source)

Workarounds / mitigations

Detection / verification