/

CVE-2026-46339

Severity:

CRITICAL RISK

(10.0)

Unauth MCP Plugin Command Exec (CWE-78) in 9Router

CVE-2026-46339

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-78, CWE-306

Impact:

Remote Command Execution and Full System Compromise

Severity:

CRITICAL RISK

(10.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A flaw in 9Router's proxy middleware left /api/cli-tools/* and /api/mcp/* endpoints unprotected, enabling unauthenticated users to register custom plugins and issue commands via the MCP bridge.

When exposed, this can allow arbitrary command execution on the underlying host or environment whenever these plugin interfaces are reachable over the network.

Affected context

This vulnerability appears in 9Router deployments using versions 0.4.30 through 0.4.37 where:

  • The application is reachable over a network interface (local, LAN, or public)
  • The proxy middleware in src/proxy.js does not enforce authentication for /api/cli-tools/* and /api/mcp/*
  • The MCP bridge is configured and able to execute commands or interact with the host/agents

It becomes particularly risky in environments where 9Router is used as a central automation or AI routing hub with elevated system access.

Exploit preconditions

  • Attack surface: HTTP endpoints /api/cli-tools/* and /api/mcp/* exposed by 9Router
  • Required access: Network access to the 9Router instance; no authentication required on affected routes
  • Trigger point: Sending crafted requests to:
  • Register or modify customPlugins via cowork-settings routes
  • Use the MCP bridge to issue commands through the registered tools
  • Why exploitation is possible: Missing authentication and authorization checks on sensitive middleware routes allow arbitrary actors to register executable tooling and invoke command-like operations without any identity validation.

Why this happens

The core issue is a combination of missing access control and unsafe command-capable functionality exposed through APIs.

Specifically, src/proxy.js did not enforce authentication on /api/cli-tools/* and /api/mcp/*, mapping to CWE-306: Missing Authentication for Critical Function, because critical plugin registration and command interfaces were accessible to unauthenticated users.

Once untrusted clients can define or control command-capable plugins, the system effectively treats attacker-controlled input as operational instructions, leading to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') when those plugins or MCP commands can influence the underlying command execution environment.

Abstractly, a privileged orchestration interface was exposed without proper identity and trust boundary enforcement, allowing an arbitrary party to bridge configuration inputs directly into potentially dangerous command execution.

Potential impact

  • Attackers can execute arbitrary commands through the MCP bridge and associated tooling
  • Full compromise of the host running 9Router, including data theft or destruction
  • Abuse of AI router capabilities to perform unauthorized automation tasks in connected systems
  • Lateral movement to other services or infrastructure reachable from the compromised host
  • Persistent backdoor installation via malicious custom plugins or modified settings

General mitigation guidance

Mitigation generally focuses on restoring strong access control around critical command and plugin interfaces, and reducing the command execution surface.

Pattern-level guidance includes:

  • Enforcing authentication and authorization on all routes that register or manage tools, plugins, or command-capable features
  • Treating plugin registration and MCP-style bridges as privileged operations and limiting them to trusted, authenticated administrative principals
  • Designing command execution layers to minimize direct translation from user input to shell or process-level commands, favoring constrained, parameterized operations
  • Applying least-privilege to the runtime environment so that even if command-capable features misbehave, the process has restricted filesystem and network permissions
  • Segmenting command orchestration components from public-facing endpoints via network policies, API gateways, or internal-only bindings

How teams detect issues like this

Detection typically combines code-centric and environment-centric approaches:

  • Static analysis and manual review focused on:
  • Routes and middleware that expose command or tooling interfaces
  • Any HTTP handler that can register or modify plugins, tools, or MCP connectors
  • Missing authentication/authorization decorators, guards, or middlewares on these critical paths
  • Logging and monitoring for:
  • Unexpected plugin registrations or changes in cowork settings
  • High-volume or unusual MCP command invocations, especially from unknown IP addresses
  • Policy enforcement in CI/CD that:
  • Requires authentication checks for routes associated with administration, configuration, or command execution
  • Flags new endpoints that can influence process spawning, shell execution, or external tool invocation
  • Optional use of automated application security testing tools that can exercise API endpoints, check for exposed administrative routes, and simulate unauthorized access attempts.

Sources

SourceLink
github.comgithub.com/decolua/9router/commit/992f4db4a0d858bcc86b4786f2abab117a6ccdf8
github.comgithub.com/decolua/9router/security/advisories/GHSA-fhh6-4qxv-rpqj

Frequently asked

questions

Any actor with network access to the affected 9Router instance and the exposed endpoints can potentially exploit it, because the critical routes lacked authentication. In scenarios where 9Router is reachable from the public internet, this translates into fully remote exploitation.

Only network-level access to the 9Router HTTP interface is required; no credentials are needed on vulnerable versions. Once connected, an attacker can register or manipulate custom plugins and drive command execution through the MCP bridge.

The safest pattern is to require strong authentication and authorization on all administrative, plugin, and command-execution APIs, and to treat these endpoints as privileged configuration surfaces. Additionally, design the command layer to accept only constrained, validated operations instead of free-form commands.

Apply a security-by-design approach where any functionality that can influence command execution, plugins, or system configuration is placed behind strict identity and access controls. Combine this with least-privilege runtime configurations, thorough code review of new administrative endpoints, and automated checks that prevent unauthenticated exposure of critical functions.

Find out what's already
exploitable in your codebase.