Image: GitHub social preview for the ruvnet/ruflo repository — official project repository page image, used with attribution.
Ruflo MCP Bridge RCE (CVE-2026-59726, “RufRoot”): Upgrade to 3.16.3 or Later — the Default Compose File Left the Bridge Open
Evidence: RESEARCH_ONLY — NOT LAB TESTED. This article is based on primary sources read directly on 26 November 2026: the NVD record for CVE-2026-59726, the GitHub security advisory GHSA-c4hm-4h84-2cf3, the Ruflo v3.16.3 security release and the latest release v3.80.9, and the CISA Known Exploited Vulnerabilities feed. The checks and upgrade steps below were not run in a lab, and no command output in this article comes from a live run. Nothing here describes a tested upgrade, a tested backup, or a tested configuration change. See Verification scope.
The question
You self-host Ruflo with Docker Compose — the agent meta-harness that orchestrates Claude Code and Codex agents — and you deployed it the way the project ships it: docker compose up with the default compose file. Is your MCP bridge exposed to your network, and what do you do about it?
The decision up front: upgrade to Ruflo 3.16.3 or later — the latest release is 3.80.9 as of 26 November 2026. If you are still on any release below 3.16.3, firewall ports 3001 (the MCP bridge) and 27017 (MongoDB) immediately, then upgrade, then rotate every provider API key and audit the AgentDB learning store. A patched redeploy alone does not undo damage that already happened: the advisory warns explicitly that poisoning of the learning store persists across an upgrade, and any API key an attacker read is still valid until you rotate it.
This is not breaking news. The flaw was disclosed in July 2026 and fixed the same week it was reported. It is surfacing again now as a late catch — which is exactly why it matters: four and a half months after the fix, any instance still running the old default deployment is still open in exactly the same way.
What Ruflo is, and what the flaw is
Ruflo is an agent meta-harness for Claude Code and Codex, distributed as the npm package ruflo from the repository ruvnet/ruflo under the MIT license. Its default Docker Compose deployment ships an MCP bridge — the HTTP service that exposes Ruflo’s tools over the Model Context Protocol — alongside MongoDB.
CVE-2026-59726, named “RufRoot” by the disclosing researchers at Noma Security, is scored 10.0 Critical on CVSS 3.1 (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H), weakness CWE-78 (OS command injection). The NVD record was published on 9 July 2026 and last modified on 25 October 2026; its status is Deferred. The NVD description states the flaw plainly:
Prior to 3.16.3, Ruflo’s default docker-compose deployment exposed the MCP bridge POST
/mcpand POST/mcp/:groupendpoints without authentication, allowing an unauthenticated network attacker to invoketools/calltoterminal_execute, obtain a shell in the bridge container, read provider API keys, and poison AgentDB learning-store patterns.
Three things made this a 10.0 rather than a configuration footnote. First, the bridge was bound to all interfaces by the compose defaults — not loopback — so anyone who could reach the host on the bridge port could reach the endpoint. Second, there was no authentication at all on POST /mcp: no token, no login, no allowlist. Third, the one control that looked like it should have stopped this — a tool blocklist mentioning terminal_execute — was enforced only in the autopilot flow. The POST /mcp and POST /mcp/:group endpoints bypassed it entirely. An attacker did not need to find a bypass for the blocklist; the exposed endpoint simply never consulted it.
The lesson is the one this blog keeps returning to: the default deployment is the deployment. Most self-hosters run the compose file as shipped. When the shipped defaults bind a privileged service to all interfaces with no authentication, the shipped defaults are the vulnerability.
What an unauthenticated network attacker gets
The advisory (GHSA-c4hm-4h84-2cf3) spells out the impact step by step. Each item below is stated in the advisory or the NVD description; nothing here is extrapolated beyond them.
| What the attacker obtains | Why it matters |
|---|---|
A shell in the bridge container, as user node (uid 1000), via terminal_execute | Command execution inside a container that is wired into your agent infrastructure |
| Every provider API key from the container environment | The keys the bridge uses to call model providers — usable by the attacker on your account, at your expense |
| The ability to spawn attacker-controlled swarms on the victim’s keys | Your paid provider access, driving agent work the attacker chooses |
| Unauthenticated MongoDB, bound to all interfaces by the same compose defaults | The project’s database, reachable without credentials |
| Write access to the AgentDB learning store | Poisoned patterns persisted into the store that steers future AI outputs for all users of the instance |
The last row is the one that survives an upgrade: a poisoned pattern does not disappear when you deploy the fixed release — it keeps steering future AI outputs until somebody finds it and purges it.
The fix in 3.16.3
Ruflo v3.16.3, released 1 July 2026 at 14:34:02 UTC, is titled “Security release (GHSA-c4hm-4h84-2cf3, ADR-166 MCP bridge RCE)”. The fix landed as PR #2521 (commit d00a0a40cd8bdbca877ac7f675f416bdc69accd1) and is documented in ADR-166, v3/docs/adr/ADR-166-mcp-bridge-unauthenticated-rce-remediation.md. The remediation, as stated in the advisory, has five main parts, plus hardening around the container itself:
| Fix in 3.16.3 | What it changes |
|---|---|
| Loopback bind by default | The bridge binds to loopback unless the operator deliberately opts into a public bind |
| Fail-closed authentication | A Bearer token (MCP_AUTH_TOKEN) is required, compared in constant time; a public bind without a token fails closed instead of silently opening up |
terminal_execute gated server-side | The tool is gated behind server-side executeTool controls and is opt-in via MCP_ENABLE_TERMINAL — it is no longer reachable just by calling the endpoint |
| MongoDB authentication on by default | MongoDB runs with --auth by default, and MONGO_INITDB_ROOT_PASSWORD is required to boot |
| CORS allowlist | Cross-origin access is restricted to an allowlist |
| Read-only container with tmpfs, plus CI regression locks | The bridge container runs read-only, and static, runtime and compose-default checks are locked in CI so the defaults cannot quietly regress |
The important design choice is the second row: fail-closed. On the fixed release, opting into a public bind without setting MCP_AUTH_TOKEN does not produce a working-but-open bridge — it fails. That is the correct default for a service that hands out shell access, and it is the property you should verify after upgrading: if your bridge is reachable from the network, it must demand a token.
One scoring note: the v3.16.3 release body calls the advisory “CVSS 9.8 critical”, but this article uses the NVD score, CVSS 3.1 10.0, and does not cite 9.8 as the score.
Timeline: reported, fixed in about a day, disclosed after a window
- 30 June 2026 — reported to the maintainer by Eli Ainhorn, Senior AI Vulnerability Researcher at Noma Security.
- ~24 hours later — fix PR #2521 landed.
- 1 July 2026 — v3.16.3 security release published (14:34:02 UTC).
- 9 July 2026 — NVD published the CVE-2026-59726 record (18:16:57 UTC).
- 29 July 2026 — public advisory at the end of the coordinated-disclosure window. Noma Security named the flaw “RufRoot”.
The speed of the fix is worth noting because it cuts both ways. The maintainer did the right thing fast — but a fix that ships within a day of the report still only protects the people who upgrade. Every instance deployed from the old compose file and never touched again has been exposed since, through July, August, September, October and November.
Exploitation status: what is confirmed and what is not
CVE-2026-59726 is not in CISA’s Known Exploited Vulnerabilities (KEV) catalog. The KEV feed was read directly on 26 November 2026: catalog version 2026.11.25, 1,805 entries, none added on or after 26 November 2026, and no Ruflo entry. No exploitation in the wild is reported in the sources read for this article. Do not read this article as claiming otherwise.
That absence is not a reason to wait. A public end-to-end reproduction has been described in secondary coverage, and the flaw needs no credentials, no user interaction and no unusual configuration — only network reachability to the bridge port. A 10.0 with a trivial precondition and a public reproduction is precisely the profile where “not yet observed” stops being reassuring.
How to check whether you are exposed
You do not need a scanner. Three checks, run on the host that runs Ruflo, answer the question. These commands were not run in a lab for this article — they are given so you can run them and observe the result on your own system.
# 1. Which Ruflo version are you running? Check the image tag in use.
docker compose images
docker images | grep -i ruflo
# 2. What is listening, and on which interfaces? Look for 3001 and 27017.
ss -tlnp | grep -E '3001|27017'
# 3. What does your compose file actually bind and expose?
grep -nE '3001|27017|MCP_AUTH_TOKEN|MCP_ENABLE_TERMINAL|MONGO_INITDB_ROOT_PASSWORD' docker-compose.yml
How to read the results:
- Any Ruflo version below 3.16.3 is affected. The fix is in 3.16.3; the current latest release is v3.80.9, published 26 November 2026 at 14:39:04 UTC (v3.80.8 was published 25 November 2026 at 15:54:30 UTC). Upgrade to 3.16.3 at minimum — in practice, upgrade to the latest release, 3.80.9 as of 26 November 2026.
- A listener on
0.0.0.0:3001or*:3001means the bridge is reachable from the network, not just from the host. On a fixed release the bridge binds loopback by default; a public bind is an explicit opt-in that must come withMCP_AUTH_TOKENset. - A listener on
0.0.0.0:27017or*:27017means MongoDB is reachable from the network. On the fixed release MongoDB runs with authentication on by default. - No
MCP_AUTH_TOKENin your compose file on a pre-3.16.3 deployment means there is no authentication at all — that is the vulnerable configuration, not a missing hardening step.
If you run Ruflo behind a reverse proxy, check the proxy too: a bridge bound to loopback is still exposed if the proxy forwards to it without authentication.
The upgrade
- Firewall ports 3001 and 27017 first, before you touch anything else. Block them at the host firewall and, if the host sits behind a router, at the router too. This is the advisory’s first instruction to operators of any exposed instance, and it closes the network path while you work. Do not skip it on the assumption that the upgrade will be quick.
- Upgrade to Ruflo 3.16.3 or later — latest 3.80.9 as of 26 November 2026. Update the image tag in your compose file (or pull the new image, depending on how you deploy), then recreate the bridge and MongoDB containers. A
docker compose pullof the same tag only helps if the tag has been rebuilt; pin the version you intend to run and confirm it after the pull. - Set
MCP_AUTH_TOKENto a long, random token if the bridge is reachable from anywhere other than loopback — and prefer loopback binding in the first place. On the fixed release a public bind without a token fails closed; set the token anyway, keep it out of version control and out of screenshots, and treat it like any other credential. - Leave
MCP_ENABLE_TERMINALunset unless you have a specific reason to enable terminal execution through the bridge. On the fixed releaseterminal_executeis gated server-side and opt-in; enabling it restores the most powerful tool in the set, so the decision should be deliberate, not a copy-paste from an old compose file. - Confirm MongoDB authentication is on — the fixed release requires
MONGO_INITDB_ROOT_PASSWORDto boot. If your existing MongoDB data directory was created by the old, unauthenticated deployment, do not assume the new setting retroactively secures the old data; that data is covered by the audit in the next section. - Restart and verify. Recreate the containers, then re-run the
sscheck above: the bridge should listen on loopback only (or demand a token if publicly bound), and MongoDB should no longer accept unauthenticated connections. Keep a backup of the previous working compose file and data volumes so you can roll back if the upgrade breaks your setup — define the rollback before you start, not after something breaks. Note that rolling back to a pre-3.16.3 release re-opens the vulnerability; a rollback is a reason to re-apply the firewall block in step 1, not a return to normal.
After upgrading: rotate keys and audit the store
Upgrading closes the hole. It does not undo anything that already passed through it. The advisory lists four operator actions, in this order:
- Firewall
:3001and:27017immediately (done above, before the upgrade). - Rotate provider API keys: OPENAI, GOOGLE, OPENROUTER and ANTHROPIC. Every provider key that was present in the bridge container’s environment on an exposed instance must be treated as read. Rotate each one at the provider, update Ruflo’s configuration with the new keys, and revoke the old ones — rotating without revoking leaves the old key usable.
- Audit the AgentDB pattern store for injected
agentdb_pattern-storeentries and purge poisoned patterns. A patched redeploy alone does not undo poisoning. If you cannot confidently audit the store, treat its contents as untrusted until you can. - Audit MongoDB for tampering. The database was reachable without authentication on the old defaults; check for unexpected users, roles, collections or data before you trust it again.
If you are unsure whether your instance was ever reachable — for example it sat behind NAT, or you are not sure when a port was forwarded — treat it as exposed and do the rotation and audit anyway. The cost of rotating a key is minutes; the cost of leaving a stolen key active is whatever the holder chooses to spend on it.
If you cannot upgrade yet
Sometimes the upgrade cannot happen today — a pinned integration, a custom image, a maintenance window days away. In that case the interim posture is the firewall, not a workaround inside Ruflo:
- Block 3001 and 27017 at the network edge and the host firewall so the bridge and MongoDB are reachable only from loopback (or from the specific hosts that must reach them). This is the single mitigation that removes the network precondition the flaw needs.
- Do not expose the bridge through a reverse proxy without authentication in front of it. A proxy that forwards unauthenticated requests to an unauthenticated bridge changes nothing.
- Do not rely on the tool blocklist. It was enforced only in the autopilot flow and is bypassed by the exposed endpoints; on an unpatched release it is not a control.
- Plan the upgrade as the next maintenance action, not as a someday item. The fix has existed since 1 July 2026. Every day on a pre-3.16.3 release is a day running a known 10.0 with a public reproduction described in secondary coverage.
License note
Ruflo is distributed under the MIT license (GitHub license API: SPDX identifier MIT, license file at LICENSE). Nothing about the license affects the upgrade guidance in this article.
Verification scope
- Sources read directly on 26 November 2026: the NVD API record for CVE-2026-59726; the GitHub security advisory GHSA-c4hm-4h84-2cf3 (read in full, including the operator actions and the remediation list); the GitHub releases API for v3.16.3 (published 2026-07-01T14:34:02Z) and the latest release v3.80.9 (published 2026-11-26T14:39:04Z); the GitHub license API for
ruvnet/ruflo(MIT); and the CISA KEV feed (catalog version 2026.11.25, 1,805 entries). - Secondary corroboration: the disclosure timeline (reported 30 June 2026 by Eli Ainhorn at Noma Security; fix PR #2521 in about 24 hours; public advisory 29 July 2026; the name “RufRoot”) rests on secondary sources that agree with each other and are consistent with the primary release date of 1 July 2026.
- Not verified in this run: whether any Ruflo version between 3.16.3 and 3.80.9 reintroduced the bridge exposure (no signal either way — the article’s advice, upgrade to the latest release and verify the bridge binds loopback, covers it); the end-to-end reproduction described in secondary coverage (not read directly); and any published end-of-life or support matrix for Ruflo (none was found — the project ships frequent releases, with v3.80.9 on 26 November 2026).
- Deliberately not stated: a count of the tools the bridge exposes and any GitHub star count or marketplace ranking for Ruflo. A secondary source gives a tool count, but the GHSA text re-read for this article states no such number, so this article does not repeat it. No popularity figure for the project was verified.
- Not lab-tested: no check, upgrade, configuration change or command in this article was run in a lab. Commands are given so the reader can run them and observe the result on their own systems.
- What this article does not claim: that CVE-2026-59726 is exploited in the wild or listed in CISA KEV (it is neither, as of 26 November 2026); that it is breaking news (the disclosure is July 2026 — this is a late catch, framed as an evergreen default-deployment warning); that a patched redeploy undoes AgentDB poisoning (the advisory warns the opposite); or that the tool blocklist protects an unpatched instance (it does not — the exposed endpoints bypass it).
Sources
- NVD record, CVE-2026-59726 — https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-59726
- GitHub security advisory GHSA-c4hm-4h84-2cf3 — https://github.com/ruvnet/ruflo/security/advisories/GHSA-c4hm-4h84-2cf3
- Ruflo v3.16.3 security release — https://github.com/ruvnet/ruflo/releases/tag/v3.16.3
- Ruflo repository (ruvnet/ruflo) — https://github.com/ruvnet/ruflo
- ADR-166: MCP Bridge Unauthenticated RCE — Coordinated Disclosure Remediation — https://github.com/ruvnet/ruflo/blob/main/v3/docs/adr/ADR-166-mcp-bridge-unauthenticated-rce-remediation.md
- CISA Known Exploited Vulnerabilities feed — https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json
Related reading on phamnam.me
- GPUStack Auth Bypass (CVE-2026-102895): Upgrade to 2.3.1 — the same pattern in another self-hosted AI service: an unauthenticated request reaching a privileged endpoint, fixed by upgrading and then auditing what the exposure already created.
- Dokploy CVE-2026-129987: upgrade to 0.31.4 — a self-hosted PaaS flaw where the fix is only half the job — the exposed instance needs an audit after the upgrade, not just a new version.
- LiteLLM Gateway: a multi-model API in OpenAI format — the other side of the same stack: a self-hosted AI gateway, where provider API keys are exactly the asset an exposed bridge gives away.
Bình luận
Bình luận được duyệt trước khi hiển thị.Đang tải bình luận…
Để lại bình luận