Summary
ToolHive MCP server containers may run without network isolation, allowing a malicious or compromised server to reach host-local services, ToolHive proxies, and control-plane endpoints through the Docker gateway. Because these endpoints may be accessible without authentication, an attacker could access data, invoke sibling tools, modify workload state, or disrupt services without escaping the container.
Affected context
The issue affects ToolHive deployments where locally run MCP server containers use the default network permission profile instead of an isolated network policy. It is especially relevant when the ToolHive API, MCP proxy endpoints, or control-plane services are reachable from the container network without authentication. ToolHive Studio configurations that explicitly disable network isolation can increase exposure.
Exploit preconditions
- Attack surface: Network connectivity from an MCP server container to Docker gateway and ToolHive-managed endpoints
- Required access: Ability to deploy, control, or compromise an MCP server used by ToolHive
- Trigger point: Network requests made by the MCP server to host-local services, sibling proxies, or the ToolHive control plane
- Why exploitation is possible: Default or explicitly disabled network isolation permits connectivity, while reachable endpoints may lack authentication and authorization controls
Why this happens
The vulnerability results from an insecure network trust boundary around locally run MCP server containers. Containers are granted connectivity to host-local and ToolHive-managed services without enforcing a sufficiently restrictive network policy, and some reachable endpoints do not require authentication.
This maps primarily to CWE-284: Improper Access Control, because access to protected services is not adequately restricted based on the container's identity or role. It also relates to CWE-306: Missing Authentication for Critical Function, where sensitive API or proxy operations may be reachable without verifying the caller.
Potential impact
- An attacker may access host-local services and exposed operational data
- A compromised MCP server could invoke tools provided by sibling MCP servers
- Attackers could read logs, configuration data, or other sensitive information
- Unauthorized requests could alter process or workload state
- Service availability could be disrupted
- The attacker could move laterally across ToolHive-managed components without escaping the container
General mitigation guidance
Mitigation generally focuses on reducing container network trust and requiring authenticated, authorized access to internal services.
Common defensive patterns include:
- Enable network isolation by default for locally run MCP containers
- Use explicit allowlists for required destinations and protocols
- Avoid exposing host-local services through broad Docker gateway connectivity
- Require authentication and authorization for ToolHive APIs, MCP proxies, and control-plane operations
- Apply least-privilege identities and narrowly scoped service permissions
- Treat MCP server containers as potentially untrusted workloads
- Prevent client or UI settings from silently overriding secure backend isolation defaults
- Monitor and restrict access to sensitive logs, workload controls, and administrative endpoints
How teams detect issues like this
Organizations can detect this class of issue through:
- Static analysis and configuration checks for disabled network isolation or permissive container network profiles
- Code review searches for boolean settings that override secure isolation defaults
- Inventory and policy checks identifying unauthenticated API, proxy, or control-plane endpoints
- Network testing from MCP containers to host-local addresses, Docker gateway services, and sibling proxies
- Runtime monitoring for unexpected container-to-host or container-to-container connections
- Authorization tests confirming that sensitive operations reject unauthenticated and unauthorized callers
- Automated security review tools that flag missing authentication and overly broad network permissions

