AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-59726: ruflo MCP bridge allows unauthenticated remote code execution in default Docker Compose deployments

criticalCVSS 3.1 10.0GHSA-c4hm-4h84-2cf3

The ruflo MCP bridge in the default Docker Compose deployment exposes POST /mcp with no authentication, so any network attacker can run shell commands in the bridge container. ruflo npm versions below 3.16.3 are affected. Upgrade to 3.16.3, firewall ports 3001 and 27017, and rotate provider API keys.

Published Nov 24, 2026 · Analysis Nov 24, 2026

What an attacker can do

The bridge shipped in ruflo/docker-compose.yml accepted POST /mcp from anyone. The compose defaults bound both the bridge and MongoDB to all interfaces. An attacker calls tools/call with the terminal_execute tool and gets a shell as the node user (uid 1000) inside the bridge container. The blocklist that names terminal_execute applied only to the autopilot flow, so POST /mcp and POST /mcp/:group skipped it.

What the attacker gets: every provider API key in the container environment (OpenAI, Google, OpenRouter, Anthropic), the ability to start their own swarms on your keys and billing, and write access to the AgentDB learning store. They can plant a poisoned pattern there that steers the AI output of every user of the instance. The advisory warns that a patched redeploy does not undo poisoning.

No credentials and no user action are needed, only a route to port 3001. The exposed MongoDB adds a second path to the data.

Who is affected

The npm package ruflo, all versions below 3.16.3, when you run the default docker-compose.yml with the MCP bridge. Check the installed version:

npm ls ruflo
npm ls -g ruflo

Also check whether ports 3001 (bridge) and 27017 (MongoDB) are reachable from outside the host. A Compose deployment is exposed if they listen on all interfaces.

ruflo

Ecosystem
npm
Affected
< 3.16.3
Fixed in
3.16.3
Check
npm ls ruflo

How to fix it

Upgrade to ruflo 3.16.3:

npm install [email protected]

This release binds the bridge to loopback by default and refuses a public bind without MCP_AUTH_TOKEN. It adds bearer-token auth with a constant-time compare, gates terminal_execute behind MCP_ENABLE_TERMINAL=true, turns on MongoDB authentication (MONGO_INITDB_ROOT_PASSWORD is now required), and runs the container read-only.

If an instance was ever exposed, the advisory says to also: firewall :3001 and :27017, rotate the OpenAI, Google, OpenRouter and Anthropic keys, audit the AgentDB pattern store for injected agentdb_pattern-store entries and purge them, and audit MongoDB for tampering.

How to tell if you were hit

Search bridge access logs for POST requests to the mcp path from addresses outside your network, especially tools/call requests naming terminal_execute. Inspect the AgentDB store for agentdb_pattern-store entries you did not create. Review MongoDB for unexpected users, collections or changes, and check provider dashboards for usage you do not recognize. Where an AI agent runs next to ruflo, Beam's recorded shell commands and MCP tool calls can show a terminal_execute call that came from the bridge.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

The MCP bridge shipping in ruflo/docker-compose.yml exposed POST /mcp with no authentication. The docker-compose defaults bound the bridge and MongoDB to all interfaces. Combined, an unauthenticated network attacker could invoke tools/call → terminal_execute inside the bridge container, obtain a shell as node (uid 1000), read every provider API key from the container env, spawn attacker-controlled swarms on the victim's keys, and persist a poisoned pattern into the AgentDB learning store that steers future AI outputs for all users of the instance.

The tool blocklist that mentions terminal_execute was enforced only in the autopilot flow. POST /mcp and POST /mcp/:group bypassed it.

Fixed in ADR-166 Phase 1-3 (branch security/adr-166-mcp-bridge-rce, PR #2521):

  • Bind loopback by default; fail-closed on public-bind opt-in without MCP_AUTH_TOKEN
  • Bearer auth middleware (timingSafeEqual constant-time compare)
  • Server-side executeTool gate for terminal_execute (MCP_ENABLE_TERMINAL=true opt-in)
  • MongoDB --auth on by default; MONGO_INITDB_ROOT_PASSWORD required to boot
  • read_only container + tmpfs
  • CORS allowlist wiring
  • CI regression locks (static + runtime + compose defaults)

Operators of any exposed instance MUST:

  1. Firewall :3001 and :27017 immediately
  2. Rotate OPENAI / GOOGLE / OPENROUTER / ANTHROPIC keys
  3. Audit the AgentDB pattern store for injected agentdb_pattern-store entries; purge poisoned patterns. A patched redeploy alone does NOT undo poisoning.
  4. Audit MongoDB for tampering

Credit: Eli Ainhorn, Senior AI Vulnerability Researcher @ Noma Security

Reviewed by Dragan Spiridonov (ADR-166 co-author).

Credited to ruvnet.

Questions

Does CVE-2026-59726 need authentication?

No. In affected versions POST /mcp accepted unauthenticated requests, and the attacker needs only network access to port 3001 to call terminal_execute.

Is upgrading to ruflo 3.16.3 enough?

Not if the instance was exposed. The advisory says a patched redeploy does not undo poisoning of the AgentDB store, so purge injected patterns, rotate API keys and audit MongoDB as well.

Is it exploited in the wild?

No source says so and no KEV entry is set. The advisory credits a researcher at Noma Security with the report.

Is a loopback-only deployment safe?

The fixed release binds to loopback by default. Older versions bound to all interfaces by default, so check your compose file and firewall if you did not upgrade.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

Coverage on the Beam blog