/

CVE-2026-63732

Severity:

CRITICAL RISK

(9.9)

Command Injection (CWE-78) via MCP Plugins in 9router

CVE-2026-63732

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

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

9router 0.4.59 contains a chained vulnerability that starts with a hardcoded default password, escalates through a Host header bypass of LOCAL_ONLY protections, and culminates in command injection via unvalidated arguments passed to child_process.spawn() when registering MCP plugins.

A remote, unauthenticated attacker can use the default credential, spoof the Host header to access local-only routes, and register a malicious MCP plugin that executes arbitrary OS commands when its SSE endpoint is triggered.

9router 0.4.59 contains a chained vulnerability that starts with a hardcoded default password, escalates through a Host header bypass of LOCAL_ONLY protections, and culminates in command injection via unvalidated arguments passed to child_process.spawn() when registering MCP plugins.

A remote, unauthenticated attacker can use the default credential, spoof the Host header to access local-only routes, and register a malicious MCP plugin that executes arbitrary OS commands when its SSE endpoint is triggered.

Affected context

This vulnerability affects 9router deployments running version 0.4.59 where:

  • The default hardcoded credential has not been changed on first use
  • The application relies on a LOCAL_ONLY network gate enforced by the HTTP Host header
  • MCP plugin registration is exposed through HTTP routes that ultimately call child_process.spawn()

In such environments, the trust boundary between external HTTP clients and the local execution environment becomes blurred, enabling untrusted input to reach OS-level process execution.

This vulnerability affects 9router deployments running version 0.4.59 where:

  • The default hardcoded credential has not been changed on first use
  • The application relies on a LOCAL_ONLY network gate enforced by the HTTP Host header
  • MCP plugin registration is exposed through HTTP routes that ultimately call child_process.spawn()

In such environments, the trust boundary between external HTTP clients and the local execution environment becomes blurred, enabling untrusted input to reach OS-level process execution.

Exploit preconditions

  • Attack surface: Publicly reachable HTTP interface of 9router, including authentication and MCP plugin management endpoints
  • Required access: Network access to the 9router HTTP port; no prior authentication if the default password remains unchanged
  • Trigger point: Registration and subsequent triggering of an MCP plugin whose command is constructed from user-supplied arguments passed directly to child_process.spawn()
  • Why exploitation is possible:
  • A hardcoded default password ("123456") allows easy initial login on fresh or un-hardened installations
  • The LOCAL_ONLY gate relies on the Host header, which can be spoofed by an attacker to reach internal-only routes
  • Arguments to child_process.spawn() are not properly validated or constrained, allowing attacker-controlled values to form the executed command
  • Attack surface: Publicly reachable HTTP interface of 9router, including authentication and MCP plugin management endpoints
  • Required access: Network access to the 9router HTTP port; no prior authentication if the default password remains unchanged
  • Trigger point: Registration and subsequent triggering of an MCP plugin whose command is constructed from user-supplied arguments passed directly to child_process.spawn()
  • Why exploitation is possible:
  • A hardcoded default password ("123456") allows easy initial login on fresh or un-hardened installations
  • The LOCAL_ONLY gate relies on the Host header, which can be spoofed by an attacker to reach internal-only routes
  • Arguments to child_process.spawn() are not properly validated or constrained, allowing attacker-controlled values to form the executed command

Why this happens

The core bug class maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

9router passes user-controlled arguments to child_process.spawn() during MCP plugin registration without robust validation, escaping, or restriction of allowed commands and parameters.

This insecure pattern turns an extensibility mechanism (plugins) into a direct conduit for executing arbitrary OS commands under the application's privileges.

The risk is amplified by adjacent design flaws: reliance on a hardcoded default password for initial access and trusting the Host header for LOCAL_ONLY enforcement, which weakens the surrounding authentication and isolation assumptions and makes the injection path remotely reachable.

The core bug class maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

9router passes user-controlled arguments to child_process.spawn() during MCP plugin registration without robust validation, escaping, or restriction of allowed commands and parameters.

This insecure pattern turns an extensibility mechanism (plugins) into a direct conduit for executing arbitrary OS commands under the application's privileges.

The risk is amplified by adjacent design flaws: reliance on a hardcoded default password for initial access and trusting the Host header for LOCAL_ONLY enforcement, which weakens the surrounding authentication and isolation assumptions and makes the injection path remotely reachable.

Potential impact

  • Remote execution of arbitrary OS commands under the 9router process account
  • Full compromise of the host operating system, including file read/write and process control
  • Theft or tampering of configuration data, credentials, and other sensitive information accessible to the service
  • Pivoting into adjacent internal services or networks reachable from the compromised host
  • Deployment of persistent backdoors or malware via malicious plugins or spawned processes
  • Remote execution of arbitrary OS commands under the 9router process account
  • Full compromise of the host operating system, including file read/write and process control
  • Theft or tampering of configuration data, credentials, and other sensitive information accessible to the service
  • Pivoting into adjacent internal services or networks reachable from the compromised host
  • Deployment of persistent backdoors or malware via malicious plugins or spawned processes

General mitigation guidance

Effective mitigation centers on hardening authentication, preserving network isolation, and strictly constraining command execution:

  • Replace hardcoded or default passwords with mandatory, user-generated credentials on first run and enforce strong password policies
  • Avoid relying on mutable headers like Host for LOCAL_ONLY or trust-boundary enforcement; prefer binding to loopback interfaces, strict listener configuration, or authenticated access controls
  • Treat all plugin configuration, including MCP plugin definitions, as untrusted input and validate it against a strict schema (whitelisted commands, restricted flags, and safe argument patterns)
  • Prefer high-level, parameterized APIs for system interactions instead of constructing shell or OS-level commands from user input
  • Run the service under a dedicated, low-privilege account and apply OS-level sandboxing or containment (e.g., chroot, containers, or similar mechanisms) to reduce blast radius
  • Design plugin systems so that plugin code runs in an isolated execution environment with explicitly scoped capabilities rather than directly invoking arbitrary commands

Effective mitigation centers on hardening authentication, preserving network isolation, and strictly constraining command execution:

  • Replace hardcoded or default passwords with mandatory, user-generated credentials on first run and enforce strong password policies
  • Avoid relying on mutable headers like Host for LOCAL_ONLY or trust-boundary enforcement; prefer binding to loopback interfaces, strict listener configuration, or authenticated access controls
  • Treat all plugin configuration, including MCP plugin definitions, as untrusted input and validate it against a strict schema (whitelisted commands, restricted flags, and safe argument patterns)
  • Prefer high-level, parameterized APIs for system interactions instead of constructing shell or OS-level commands from user input
  • Run the service under a dedicated, low-privilege account and apply OS-level sandboxing or containment (e.g., chroot, containers, or similar mechanisms) to reduce blast radius
  • Design plugin systems so that plugin code runs in an isolated execution environment with explicitly scoped capabilities rather than directly invoking arbitrary commands

How teams detect issues like this

Detection typically combines code-focused review with runtime monitoring:

  • Static analysis or manual review to locate uses of child_process.spawn(), exec, or similar APIs where any portion of the command or argument list derives from HTTP parameters, plugin definitions, or other user-controlled data
  • Policy-based checks in CI/CD that flag plugin registration paths or administrative routes that allow arbitrary commands or file paths to be configured
  • Configuration audits to detect deployments still using default credentials and to verify that LOCAL_ONLY routes are not exposed via reverse proxies or header manipulation
  • Runtime logging and anomaly detection for unusual plugin registrations (e.g., commands like node -e, interpreters, shells, or custom binaries) and unexpected outbound or privileged OS commands executed by the service
  • Periodic security testing and fuzzing of administrative and plugin management endpoints to surface new or regressed command injection paths

Detection typically combines code-focused review with runtime monitoring:

  • Static analysis or manual review to locate uses of child_process.spawn(), exec, or similar APIs where any portion of the command or argument list derives from HTTP parameters, plugin definitions, or other user-controlled data
  • Policy-based checks in CI/CD that flag plugin registration paths or administrative routes that allow arbitrary commands or file paths to be configured
  • Configuration audits to detect deployments still using default credentials and to verify that LOCAL_ONLY routes are not exposed via reverse proxies or header manipulation
  • Runtime logging and anomaly detection for unusual plugin registrations (e.g., commands like node -e, interpreters, shells, or custom binaries) and unexpected outbound or privileged OS commands executed by the service
  • Periodic security testing and fuzzing of administrative and plugin management endpoints to surface new or regressed command injection paths

Sources

SourceLink
github.comgithub.com/decolua/9router/security/advisories/GHSA-4922-8r65-fq26
vulncheck.comvulncheck.com/advisories/9router-before-remote-code-execution-via-default-password

Frequently asked

questions

Yes. If the service is exposed over the network and still uses the default password while relying on Host-based LOCAL_ONLY checks, a remote attacker can reach the MCP plugin management functionality and achieve command execution.

The chain as described assumes the presence of the hardcoded default password, which effectively grants trivial initial access on fresh or un-hardened deployments. If administrators have changed the default password and hardened access, the attack requires valid credentials or another way to reach the plugin registration endpoints.

The most robust fix pattern combines eliminating default credentials, using trust mechanisms that do not depend on spoofable headers, and enforcing strict validation on any data used to construct OS-level commands—ideally removing the need to build such commands from user input at all.

Future designs should assume all external inputs are untrusted, enforce strong authentication from first run, avoid header-based trust boundaries, and treat extensibility mechanisms like plugins as high-risk surfaces. Using least-privilege execution, input whitelisting, and safer abstractions instead of raw command execution significantly reduces the risk of similar vulnerabilities.

Yes. If the service is exposed over the network and still uses the default password while relying on Host-based LOCAL_ONLY checks, a remote attacker can reach the MCP plugin management functionality and achieve command execution.

The chain as described assumes the presence of the hardcoded default password, which effectively grants trivial initial access on fresh or un-hardened deployments. If administrators have changed the default password and hardened access, the attack requires valid credentials or another way to reach the plugin registration endpoints.

The most robust fix pattern combines eliminating default credentials, using trust mechanisms that do not depend on spoofable headers, and enforcing strict validation on any data used to construct OS-level commands—ideally removing the need to build such commands from user input at all.

Future designs should assume all external inputs are untrusted, enforce strong authentication from first run, avoid header-based trust boundaries, and treat extensibility mechanisms like plugins as high-risk surfaces. Using least-privilege execution, input whitelisting, and safer abstractions instead of raw command execution significantly reduces the risk of similar vulnerabilities.

Find out what's already
exploitable in your codebase.