CVE-2026-58197: ToolHive: default network profile enables MCP lateral movement
GHSA-qg2g-g9w3-m5h8HIGHCISA: ATTENDToolHive, an MCP server manager, runs containerized MCP servers with a default permissive network profile (insecure_allow_all) that lets them reach host-local services through host.docker.internal. Because the ToolHive API and MCP proxies are unauthenticated, a malicious or compromised MCP server can call tools on other MCP servers, reach the ToolHive control plane, and hit other host services such as Ollama or the Kubernetes API, all without a container escape. Exploitation is not yet widespread (EPSS 0.37%, top 71%; not in CISA KEV; no public exploit or Nuclei template), but CISA SSVC rates it ATTEND, and the package has 1,776 downstream dependents and 36 other CVEs. Upgrade to ToolHive 0.30.1 or later (and toolhive-studio 0.38.0) now. Until then, restrict MCP server network profiles and block access to the host gateway.
What is the risk?
High (CVSS 8.8). Exploitation needs a malicious or compromised MCP server running in a ToolHive container, which a user may install in good faith from a registry. Once running, the attack is trivial: plain HTTP requests to well-known host endpoints, with no authentication. The scope change is significant because the container isolation boundary is the product's core value. Exploitation likelihood is currently low (EPSS 0.37%, no public exploit, not in KEV), but SSVC says ATTEND. Developer workstations running agents with privileged native MCP tools (shell, file write) face the highest exposure.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Ollama | go | < 0.30.1 | 0.30.1 |
Do you use Ollama? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Upgrade github.com/stacklok/toolhive to 0.30.1+ and ToolHive Studio to 0.38.0+. 2) Until patched, avoid the default insecure_allow_all profile; use restrictive permission profiles with explicit outbound allow-lists. 3) Block host.docker.internal and the Docker gateway (e.g. 172.17.0.1) from containers via firewall rules. 4) Do not run privileged native MCP servers (terminal, desktop commander) on localhost without authentication while running untrusted containers. 5) Only run vetted MCP images from trusted registries. 6) Detect: monitor container egress to host gateway addresses, port scanning from MCP containers, and unexpected MCP initialize/tools/call requests to local ports; enable audit logging of tool calls.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-58197?
ToolHive, an MCP server manager, runs containerized MCP servers with a default permissive network profile (insecure_allow_all) that lets them reach host-local services through host.docker.internal. Because the ToolHive API and MCP proxies are unauthenticated, a malicious or compromised MCP server can call tools on other MCP servers, reach the ToolHive control plane, and hit other host services such as Ollama or the Kubernetes API, all without a container escape. Exploitation is not yet widespread (EPSS 0.37%, top 71%; not in CISA KEV; no public exploit or Nuclei template), but CISA SSVC rates it ATTEND, and the package has 1,776 downstream dependents and 36 other CVEs. Upgrade to ToolHive 0.30.1 or later (and toolhive-studio 0.38.0) now. Until then, restrict MCP server network profiles and block access to the host gateway.
Is CVE-2026-58197 actively exploited?
No confirmed active exploitation of CVE-2026-58197 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-58197?
1) Upgrade github.com/stacklok/toolhive to 0.30.1+ and ToolHive Studio to 0.38.0+. 2) Until patched, avoid the default insecure_allow_all profile; use restrictive permission profiles with explicit outbound allow-lists. 3) Block host.docker.internal and the Docker gateway (e.g. 172.17.0.1) from containers via firewall rules. 4) Do not run privileged native MCP servers (terminal, desktop commander) on localhost without authentication while running untrusted containers. 5) Only run vetted MCP images from trusted registries. 6) Detect: monitor container egress to host gateway addresses, port scanning from MCP containers, and unexpected MCP initialize/tools/call requests to local ports; enable audit logging of tool calls.
What systems are affected by CVE-2026-58197?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, MCP server orchestration, local LLM inference, containerized tool execution.
What is the CVSS score for CVE-2026-58197?
CVE-2026-58197 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 0.37%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0006Active ScanningAML.T0053AI Agent Tool InvocationAML.T0084.001Tool DefinitionsAML.T0085.001AI Agent ToolsAML.T0104Publish Poisoned AI Agent ToolCompliance Controls Affected
What are the technical details?
Original Advisory
## Summary A containerized MCP server running with the default `network` permission profile (`insecure_allow_all: true`) can reach host-local services via `host.docker.internal`. This includes the ToolHive API itself, other ToolHive-managed MCP server proxies, and any other service listening on the host's localhost. Combined with the unauthenticated ToolHive API and MCP proxy endpoints, this enables a compromised or malicious MCP server to perform lateral movement without any container escape. ## Severity **High** — This bypasses the container isolation model that is ToolHive's core security value proposition. ## Reproduction All tests performed from inside the `filesystem` MCP container (`docker.io/mcp/filesystem:latest`), started with default settings via `thv run filesystem -- /tmp`. ### 1. Container can reach the ToolHive control plane MCP endpoint ```bash $ docker exec <container_id> wget -qO- \ --header="Content-Type: application/json" \ --header="Accept: application/json" \ --post-data='{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"evil-mcp","version":"1.0"}},"id":1}' \ http://host.docker.internal:50444/mcp ``` **Result:** Full MCP handshake succeeds: ```json {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-03-26","capabilities":{"logging":{},"tools":{}},"serverInfo":{"name":"toolhive-mcp","version":"v0.9.3"}}} ``` ### 2. Container can connect to another MCP server's proxy and call its tools ```bash $ docker exec <container_id> wget -qO- \ --header="Content-Type: application/json" \ --header="Accept: application/json" \ --post-data='{"jsonrpc":"2.0","method":"tools/list","params":{},"id":2}' \ http://host.docker.internal:64965/mcp ``` **Result:** Returns the full tool list of the target MCP server (read_file, write_file, edit_file, move_file, etc.), and tools can be called: ```json {"jsonrpc":"2.0","id":3,"result":{"content":[{"text":"Allowed directories:\n/tmp","type":"text"}]}} ``` ### 3. Container can reach other host services ```bash # Kubernetes API $ docker exec <container_id> wget -qO- --no-check-certificate https://host.docker.internal:6443/version {"major":"1","minor":"34","gitVersion":"v1.34.1"...} # Ollama LLM API $ docker exec <container_id> wget -qO- http://host.docker.internal:11434/api/tags {"models":[{"name":"kimi-k2:1t-cloud"...}]} ``` ## Attack Scenarios ### Scenario 1: Malicious MCP server pivots to privileged native MCP tools Many users run native (non-containerized) MCP servers like Desktop Commander, terminal servers, or custom tools that have `execute_command`, `write_file`, or `shell` capabilities with full host access. These typically listen on localhost ports. A malicious containerized MCP server can: 1. Port-scan `host.docker.internal` to discover listening services 2. Attempt MCP handshakes on discovered ports 3. Call privileged tools (e.g., `execute_command("rm -rf /")` or `write_file("/etc/crontab", "...")`) This achieves **full host compromise without any container escape vulnerability**. ### Scenario 2: Compromised MCP server manipulates ToolHive itself Via the unauthenticated ToolHive MCP endpoint on port 50444, a compromised container could potentially: - List and stop other running MCP servers (denial of service) - Start new MCP servers with attacker-controlled images - Modify configurations ### Scenario 3: Data exfiltration via cross-MCP-server access A low-privilege MCP server (e.g., `sequentialthinking` with no file mounts) could reach the `filesystem` server's proxy and call `read_file` to access files it was never authorized to see. ### Scenario 4: LLM model theft / abuse As demonstrated, the container can reach Ollama's API and could enumerate models, run inference, or exfiltrate model weights from self-hosted LLMs. ## Root Causes 1. **`insecure_allow_all: true` as default** — permits outbound connections to any destination including `host.docker.internal` 2. **No authentication on ToolHive API / MCP proxies** — any client that can reach the port can interact fully 3. **Docker's `host.docker.internal` DNS** — resolves to the host machine, bypassing localhost-only binding assumptions ## Suggested Mitigations ### Short-term - **Block `host.docker.internal` and `172.17.0.1`** (Docker gateway) in container networking by default, even when `insecure_allow_all` is enabled. These should require explicit opt-in. - **Add authentication to MCP proxy endpoints** — even a shared secret or token per session would prevent cross-container lateral movement. ### Medium-term - **Network policy per container** — ToolHive already has the `permission_profile` infrastructure. Add support for explicit allow-lists rather than just the binary none/all choice. - **Isolate container networks** — run each MCP server in its own Docker network with no access to the Docker bridge gateway. ### Long-term - **Mutual TLS or token-based auth** between ToolHive proxy and containers, so even if network access exists, unauthorized MCP calls are rejected. - **Audit logging** — log all MCP tool calls with source identification so lateral movement attempts are visible. ## Environment - ToolHive v0.9.3 (macOS desktop app, Docker runtime) - Docker Desktop for Mac (host.docker.internal enabled by default) - Tested with `docker.io/mcp/filesystem:latest`
Exploitation Scenario
An attacker publishes a useful-looking MCP server image to a public registry. A developer installs it with ToolHive default settings. On start, the malicious server port-scans host.docker.internal, finds the ToolHive MCP endpoint and the proxy of a filesystem MCP server, completes an unauthenticated MCP handshake, and calls read_file and write_file to steal SSH keys and cloud credentials or plant a cron entry. It also queries the local Ollama API to enumerate models and abuse inference, achieving host compromise without escaping the container.
Weaknesses (CWE)
CWE-284Improper Access ControlPrimaryCWE-306Missing Authentication for Critical FunctionPrimaryCWE-284Improper Access ControlCWE-306Missing Authentication for Critical FunctionalityCWE-284 — Improper Access Control: The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.
- [Architecture and Design, Operation] Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
- [Architecture and Design] Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HReferences
- github.com/advisories/GHSA-qg2g-g9w3-m5h8
- github.com/stacklok/toolhive-studio/commit/968182d7f3ee1e55123369e66ad88f82128119b0
- github.com/stacklok/toolhive-studio/pull/2469
- github.com/stacklok/toolhive-studio/releases/tag/v0.38.0
- github.com/stacklok/toolhive/commit/d8f40cb1599b8bf66657f2dfff15bfbfc236e712
- github.com/stacklok/toolhive/pull/5583
- github.com/stacklok/toolhive/releases/tag/v0.30.1
- github.com/stacklok/toolhive/security/advisories/GHSA-qg2g-g9w3-m5h8
Timeline
Related Vulnerabilities
CVE-2026-4633910.09router: unauthenticated RCE exposes LLM API keys
Same package: ollamaCVE-2026-422489.8Ollama: silent auto-update bypasses signature check on Windows
Same package: ollamaCVE-2025-633899.8ollama: Missing Auth allows unauthenticated access
Same package: ollamaCVE-2026-422499.8Ollama: path traversal + unsigned update = silent RCE
Same package: ollamaCVE-2026-74829.1Ollama: heap OOB read leaks API keys and chat data
Same package: ollama