ruflo's default MCP bridge exposed terminal execution to the network

ruflo is an agent meta-harness with a Model Context Protocol bridge. The default Docker Compose deployment shipped with POST /mcp and POST /mcp/:group exposed without authentication. The bridge also bound to all network interfaces, and the tool path included terminal_execute. CVE-2026-59726 describes the resulting unauthenticated remote code execution in versions before 3.16.3.

The issue is not that an MCP server can run tools. That is the product's purpose. The failure was the combination of a network-reachable endpoint, no caller identity, a privileged tool, and a default deployment that made the endpoint easy to expose. The tool blocklist that mentioned terminal_execute was enforced in the autopilot flow, and the MCP bridge bypassed that flow.

The default deployment made the decision

Docker Compose defaults are part of the security boundary. A service that binds to all interfaces is reachable from any network that can route to the host unless a firewall or host policy stops it. A service that also has no authentication cannot distinguish a trusted agent from a remote attacker.

The GitHub advisory describes an attacker invoking tools/call to obtain a shell in the bridge container as node with uid 1000. The attacker could read provider API keys from the container environment, use the victim's keys to spawn additional agent workloads, and persist a poisoned pattern in the AgentDB learning store. The learning-store effect can survive a patched redeploy, so replacing the container image is only one part of the response.

Inventory every bridge before rotating keys

List all ruflo deployments and their Compose files. Record the published ports, bind addresses, authentication settings, MCP tool allowlist, provider keys, MongoDB configuration, and AgentDB persistence path. Include developer laptops, shared lab systems, internal demos, and production agents. A bridge that is not internet-facing may still be reachable from a corporate network or an exposed development host.

Upgrade to 3.16.3 or later. The fixed release binds to loopback by default, requires an authentication token when public binding is explicitly enabled, applies bearer authentication, gates terminal execution behind an opt-in server-side setting, enables MongoDB authentication by default, and adds a read-only container configuration with temporary filesystems.

If an older bridge was exposed, firewall the bridge and MongoDB ports before the upgrade. Rotate every provider API key stored in the container environment, including keys used by older workflows. Review the agent learning store for unexpected pattern entries and remove poisoned data with a documented process. Audit MongoDB for unauthorized users, jobs, or configuration changes.

Treat agent tools as code execution

An MCP tool that runs a command, reads a file, deploys a workload, or changes a cloud resource is an execution primitive. Caller identity must be checked at the tool boundary as well as in the user interface. The server should know who is calling, which project or tenant owns the request, and which tool names that identity may invoke.

Log tool name, caller identity, authorization decision, input size, and outcome. Do not log full secrets or complete file contents. Add a server-side allowlist for tools and keep the destructive operations disabled by default. Set resource limits and a read-only filesystem unless the tool has a specific reason to write.

For network exposure, bind to a private interface and use a reverse proxy that enforces authentication and request size limits. Avoid a design where the agent can reach an administrative socket simply because it runs on the same host. Review CORS and browser-origin rules separately from API authentication.

Detection and recovery

Look for unexpected requests to /mcp or /mcp/:group, tool calls to terminal execution, child processes spawned by the bridge, access to provider keys, and new AgentDB patterns. Compare the timing with outbound connections and cloud API activity. A container restart or patch does not erase persistence outside the container.

After containment, rebuild the deployment from the fixed configuration, rotate credentials, rebuild the MongoDB access policy, and re-create trusted agent state from a known baseline. Tell users whose provider keys may have been exposed. Review any cloud spend or workload created with those keys.

CVE-2026-59726 is a strong example of why default network and authentication choices matter for agent infrastructure. The tool is powerful by design. The deployment must make clear who is allowed to call it and which tools they can reach.

References