The vulnerability lies in the isLocalRequest function within src/dashboardGuard.js, which is responsible for ensuring that certain sensitive API routes are only accessible from the local machine. The function incorrectly validates the origin of a request by checking the Host and Origin HTTP headers. In many common deployment scenarios, such as when 9router is placed behind a reverse proxy or a tunnel, these headers can be spoofed by a remote attacker. By sending a request with Host: localhost, an attacker can trick the isLocalRequest function into returning true, thus bypassing the security check. The proxy function, which acts as the primary middleware, calls isLocalRequest to protect these routes. When the check is bypassed, the attacker gains access to internal functionalities, which, in this case, can lead to remote code execution by interacting with MCP (Machine-to-Cloud Protocol) child processes. The issue is exacerbated by a predictable CLI token, but the root cause of the bypass is the flawed header-based validation in isLocalRequest.