ToolHive: SSRF in remote MCP server authentication discovery (host-side, bypasses container isolation)
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-918 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| stacklok | toolhive | before 0.31.0 | 0.31.0 | Patch available | CNA |
| — | github.com/stacklok/toolhive (Go) | before 0.31.0 | 0.31.0 | Patch available | GHSA-pr64-jmmf-jp54 |
- toolhive Vendorstacklok Affected before 0.31.0 Fixed in 0.31.0 Patch available CNA
- github.com/stacklok/toolhive (Go) Vendor— Affected before 0.31.0 Fixed in 0.31.0 Patch available GHSA-pr64-jmmf-jp54
Remediation
- Fix · CNA toolhive (stacklok) Fixed in 0.31.0
- Fix · GHSA-pr64-jmmf-jp54 github.com/stacklok/toolhive (Go) Fixed in 0.31.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-58196
- 2026-10-03 Alias added: GHSA-pr64-jmmf-jp54
References
More stacklok vulnerabilities
- TI-2026-41912 ToolHive: containerized MCP servers can reach host services via host.docker.internal, enabling lateral movement CVSS 3.1HIGH 8.8
- TI-2024-22541 Minder's Github Webhook Handler vulnerable to denial of service from un-validated requests CVSS 3.1HIGH 7.5
- TI-2024-25220 Denial of service from maliciously configured Git repository in Minder CVSS 3.1MEDIUM 5.7
- TI-2024-23307 Denial of service of Minder Server from maliciously crafted GitHub attestations CVSS 3.1MEDIUM 5.3
- TI-2024-23266 Stacklok Minder vulnerable to denial of service from maliciously crafted templates CVSS 3.1MEDIUM 5.3
- TI-2024-23259 Denial of service of Minder Server with attacker-controlled REST endpoint CVSS 3.1MEDIUM 5.3
Sources
- CVE-2026-58196 · CVE Program
- CVE-2026-58196 · NVD
- FIRST EPSS
- GHSA-pr64-jmmf-jp54 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences