Answers · MCP security
We self-host ruflo (the agent orchestration tool also published on npm as claude-flow) with its docker-compose file on a cloud server. I saw a critical advisory about its MCP bridge. Could someone have run commands on our server, which version fixes it, and is upgrading enough?
Last updated
TL;DR: Yes, if you ran the default docker-compose before ruflo 3.16.3 on a reachable address, and no, upgrading alone isn't enough. CVE-2026-59726 (GHSA-c4hm-4h84-2cf3, CVSS 10 in GitHub's database, added to it November 24, 2026) says the MCP bridge in ruflo's docker-compose.yml took POST /mcp with no authentication, and the compose file bound the bridge (port 3001) and MongoDB (port 27017, no password) to all interfaces. Anyone who could reach the port could call tools/call with terminal_execute, get a shell in the bridge container, read every provider API key from its environment, start agent swarms on your keys and write a poisoned pattern into the AgentDB learning store that steers later AI output for every user of the instance. The blocklist that named terminal_execute only ran in the autopilot flow. Version 3.16.3 (July 1, 2026) binds to localhost by default, requires a bearer token for public binding, gates terminal_execute on every path and requires a MongoDB password; npm listed 3.80.11 as latest on November 28. The maintainers say a patched redeploy does NOT undo poisoning: firewall, rotate keys and audit the pattern store and database too.
What should I check, step by step?
1. Check the version: ruflo before 3.16.3 is affected (the claude-flow packages were published at 3.16.3 the same day). npm listed 3.80.11 as the latest on November 28, 2026.
- If an older default docker-compose ever ran on a public or shared network, firewall ports 3001 and 27017 now, before anything else.
- Rotate the OpenAI, Google, OpenRouter and Anthropic keys that were in the bridge's environment, and check those providers' usage pages for runs you didn't start.
- Audit the AgentDB pattern store for entries you didn't write, especially ones dressed up as 'compliance' or 'best practice' guidance, and purge them. Keep a copy first, so you can show later what was there.
- Audit MongoDB for changed or exported conversations and settings; it had no password and was reachable without the RCE.
- After upgrading, set MONGO_INITDB_ROOT_PASSWORD (the new compose file refuses to start without it). Only bind the bridge publicly with MCP_BIND_HOST plus MCP_AUTH_TOKEN, and leave MCP_ENABLE_TERMINAL off unless you need it.
- Remember the fix didn't scope which API keys each spawned backend sees; that per-backend allowlist was deferred, so keep only the keys you use in the environment.
What did CVE-2026-59726 in ruflo's MCP bridge allow?
ruflo's repository advisory and ADR-166 describe the setup shipped in ruflo/docker-compose.yml. The MCP bridge answered POST /mcp and POST /mcp/:group with no authentication, only JSON parsing and wildcard CORS in front. The compose file published the bridge on port 3001 and MongoDB on 27017 on all interfaces, and MongoDB had no root password. On a cloud server that meant the internet could reach both; the ADR says the disclosed report cited a confirmed exposed instance on AWS EC2.
- The disclosed chain: call tools/call with terminal_execute to get a shell as the node user (uid 1000) in the bridge container; read the OpenAI, Google, OpenRouter and Anthropic keys, because spawned backends inherited the whole environment; start swarms that spend on those keys; write a malicious pattern into the AgentDB learning store; and read or change conversations straight from MongoDB.
- The project did block terminal_execute, but only inside the autopilot flow. The two endpoints an outside caller would use never ran that check, which the ADR calls false assurance: the control existed on the one path an attacker didn't need.
Why doesn't upgrading ruflo undo a poisoned AgentDB pattern store?
Step five of the chain is the one that outlives the fix. The AgentDB pattern store is where ruflo keeps learned patterns that shape later output. One unauthenticated write there persists and steers future AI answers for every user of the instance; the ADR's example is 'compliance' or 'best practice' patterns that make generated code call out to an attacker. A new container image doesn't touch that data.
- That's why the advisory and the 3.16.3 release tell operators of any exposed instance to do four things beyond upgrading: firewall 3001 and 27017, rotate the provider keys, audit the pattern store for injected entries and purge them, and audit MongoDB for tampering. Rotating keys stops further spending; only the audit removes what was planted.
- To audit well you need to know what the store held before the exposure. A dated export or hash of the pattern store from before the instance went public, kept outside it, turns the audit into a comparison instead of a guess.
What did ruflo 3.16.3 change, and what do operators still have to do?
Pull request 2521 and the 3.16.3 release (July 1, 2026) make the bridge bind only to localhost by default and exit at boot if you ask for a public bind without MCP_AUTH_TOKEN; check a bearer token with a constant-time compare; gate terminal_execute inside executeTool on /mcp, /mcp/:group and autopilot alike, off unless MCP_ENABLE_TERMINAL=true; run MongoDB with authentication and refuse to start without MONGO_INITDB_ROOT_PASSWORD; make the bridge's root filesystem read-only; and honour a CORS allowlist. CI checks now lock those defaults in.
- Two items were deferred: a per-backend allowlist for which environment variables each spawned backend gets, and how the chat UI passes the bridge token. So a compromised backend can still see every key in the bridge's environment; keep that environment to the keys you need.
- The general lesson for any MCP server you self-host: a tool deny list belongs where every call goes through, not in one feature's code path, and an MCP endpoint that can run commands should never be reachable without authentication.
How do I ask Rightshold about this (free, no key)?
Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Before we bring our ruflo instance back after the CVE-2026-59726 cleanup, record a receipt for the AgentDB pattern store export we audited and the provider keys we rotated, by hash.”
{
"tool": "record_action",
"arguments": {
"action_type": "security.incident_cleanup",
"outcome": "success",
"occurred_at": "2026-11-28T16:00:00Z",
"client_event_id": "ruflo:cve-2026-59726:cleanup",
"summary": "ruflo upgraded to 3.80.11; ports 3001/27017 firewalled; OpenAI, Anthropic, Google and OpenRouter keys rotated; AgentDB pattern store exported and audited, 3 unrecognised pattern entries purged; MongoDB audited",
"action_sha256": "<sha256 of the pattern store export taken before the purge>"
}
}- Needs your API key (or accept_terms:true once to open a free account; the key comes back once). It returns a ledger-committed receipt of what you submitted and when, kept outside the ruflo instance.
- It doesn't scan ruflo, inspect the pattern store or rotate keys. It proves the export existed at that time and hasn't changed since, not that the audit found everything.
Rightshold isn't affiliated with ruflo, its maintainers or Noma Security. Details are from ruflo's repository advisory GHSA-c4hm-4h84-2cf3 and its GitHub advisory database entry (CVE-2026-59726), ADR-166 in the ruflo repository, pull request 2521 and the v3.16.3 release notes, with current versions from the npm registry, all read November 28, 2026. Advisories get updated; confirm fixed versions on the linked pages.
What are the sources?
- ruflo security advisory GHSA-c4hm-4h84-2cf3: MCP bridge allows unauthenticated remote code execution in default Docker Compose deployments
- GitHub Advisory Database: GHSA-c4hm-4h84-2cf3 / CVE-2026-59726
- ruflo ADR-166: MCP bridge unauthenticated RCE, coordinated disclosure remediation
- ruflo pull request 2521: ADR-166 remediation and CI lock
- ruflo v3.16.3 security release notes (July 1, 2026)
Related
- Is it safe to run an MCP server in HTTP mode without authentication?
- Why an MCP server's tool deny list can silently miss dangerous calls
- Can anyone on the network run Kubernetes tools through k8s-mcp-server (CVE-2026-130007)?
- Keep .env secrets and API keys away from AI coding agents
Not legal advice. JSON · Markdown · All answers
Get a free API key in one call
No card and no email needed. 100 free credits; the license and policy checks stay free without a key.
curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_... # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
-H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'
