GHSA-g6g7-pvmx-m74p: 9router: Missing Authorization and OS Command Injection
9router versions prior to 0.4.45 contain an unauthenticated remote code execution vulnerability via the /api/tunnel/tailscale-install endpoint. This endpoint accepts a JSON body with a sudoPassword field, which is passed directly to a shell command executed with sudo privileges. Due to missing authorization middleware on this route, attackers can send crafted requests that execute arbitrary shell commands as root if the Node.js process runs with root privileges or sudo is configured with NOPASSWD. This allows full system compromise without authentication.
AI Analysis
Technical Summary
The 9router npm package (version <0.4.45) exposes an unauthenticated API endpoint /api/tunnel/tailscale-install that accepts a JSON body containing a sudoPassword field. This value is piped, along with the contents of https://tailscale.com/install.sh, into a child process spawned as 'sudo -S sh'. Because the route is not protected by the dashboardGuard middleware and no authentication checks are applied, an attacker can supply arbitrary shell commands in the sudoPassword field. When the Node.js process runs as root or sudo is configured to not require a password, the shell executes the attacker-supplied commands with root privileges. This leads to remote code execution on the host system. The vulnerability arises from missing authorization checks and unsafe command execution in the installation routine.
Potential Impact
An unauthenticated attacker can execute arbitrary shell commands as root on the host running 9router if the Node.js process runs with root privileges or sudo is configured with NOPASSWD. This results in full system compromise, allowing attackers to read, modify, or delete any data, install malware, or pivot within the network. The vulnerability is critical due to the combination of unauthenticated access and root-level command execution.
Mitigation Recommendations
A fix is available in 9router versions 0.4.45 and later. Users should upgrade to version 0.4.45 or newer to remediate this vulnerability. Until patched, avoid running the 9router Node.js process as root and ensure sudo requires a password (no NOPASSWD configuration). Additionally, restrict access to the /api/tunnel/tailscale-install endpoint or apply appropriate authentication and authorization controls to prevent unauthenticated access.
GHSA-g6g7-pvmx-m74p: 9router: Missing Authorization and OS Command Injection
Description
9router versions prior to 0.4.45 contain an unauthenticated remote code execution vulnerability via the /api/tunnel/tailscale-install endpoint. This endpoint accepts a JSON body with a sudoPassword field, which is passed directly to a shell command executed with sudo privileges. Due to missing authorization middleware on this route, attackers can send crafted requests that execute arbitrary shell commands as root if the Node.js process runs with root privileges or sudo is configured with NOPASSWD. This allows full system compromise without authentication.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 9router npm package (version <0.4.45) exposes an unauthenticated API endpoint /api/tunnel/tailscale-install that accepts a JSON body containing a sudoPassword field. This value is piped, along with the contents of https://tailscale.com/install.sh, into a child process spawned as 'sudo -S sh'. Because the route is not protected by the dashboardGuard middleware and no authentication checks are applied, an attacker can supply arbitrary shell commands in the sudoPassword field. When the Node.js process runs as root or sudo is configured to not require a password, the shell executes the attacker-supplied commands with root privileges. This leads to remote code execution on the host system. The vulnerability arises from missing authorization checks and unsafe command execution in the installation routine.
Potential Impact
An unauthenticated attacker can execute arbitrary shell commands as root on the host running 9router if the Node.js process runs with root privileges or sudo is configured with NOPASSWD. This results in full system compromise, allowing attackers to read, modify, or delete any data, install malware, or pivot within the network. The vulnerability is critical due to the combination of unauthenticated access and root-level command execution.
Mitigation Recommendations
A fix is available in 9router versions 0.4.45 and later. Users should upgrade to version 0.4.45 or newer to remediate this vulnerability. Until patched, avoid running the 9router Node.js process as root and ensure sudo requires a password (no NOPASSWD configuration). Additionally, restrict access to the /api/tunnel/tailscale-install endpoint or apply appropriate authentication and authorization controls to prevent unauthenticated access.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-g6g7-pvmx-m74p
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- CRITICAL
- Cvss Version
- 4.0
Threat ID: 6a46ecb327e9c7971943c640
Added to database: 07/02/2026, 22:56:51 UTC
Last enriched: 07/02/2026, 23:09:19 UTC
Last updated: 07/03/2026, 03:26:50 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.