Severity:

HIGH RISK

(7.2)

OS Command Injection in Linksys MR9600 JNAP Action Handler

CVE-2026-6992

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution on Network Device

Severity:

HIGH RISK

(7.2)

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 command injection vulnerability in the BTRequestGetSmartConnectStatus action of the Linksys MR9600 router allows crafted input in the pin parameter to be passed to the underlying shell.

When exposed over the network, a remote attacker can inject and execute arbitrary OS commands on the device with the privileges of the JNAP Action Handler.

Affected context

This vulnerability occurs in Linksys MR9600 firmware 2.0.6.206937 within the JNAP Action Handler, specifically the BTRequestGetSmartConnectStatus function implemented in /etc/init.d/run_central2.sh.

It manifests when user-controlled input (the pin argument) is incorporated into shell commands without robust validation or escaping.

The issue is relevant in deployments where:

  • The router's management or related JNAP endpoints are reachable over the local network or, potentially, via remote administration features
  • The vulnerable handler is enabled and processes requests using the pin parameter
  • OS-level commands are constructed dynamically based on request parameters

Exploit preconditions

  • Attack surface: Network-accessible JNAP / management interface of the Linksys MR9600.
  • Required access: Ability to send crafted requests to the endpoint that triggers BTRequestGetSmartConnectStatus with control over the pin parameter (often from the local network; exposure over WAN depends on configuration).
  • Trigger point: Invocation of the vulnerable shell script /etc/init.d/run_central2.sh where the pin argument is processed and passed into an OS command.
  • Why exploitation is possible: The implementation appears to concatenate or interpolate the pin value directly into a shell command without adequate sanitization or safe command-building APIs, allowing attackers to break out of the intended argument context and append arbitrary shell syntax.

Why this happens

The root cause aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') and CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').

The vulnerable code path likely builds shell commands using string concatenation or unescaped variable expansion, treating the pin parameter as trusted data.

When untrusted input is embedded directly in a shell command line, shell metacharacters (;, &&, |, backticks, substitutions, etc.) can alter the command structure and introduce additional commands.

Conceptually, this is an insecure pattern where application logic delegates functionality to the OS shell using dynamically constructed command strings instead of fixed commands with properly separated and validated arguments.

Potential impact

  • Remote execution of arbitrary OS commands on the router
  • Complete compromise of the device's configuration and network settings
  • Installation of persistent malware or rogue services on the router
  • Interception, redirection, or monitoring of network traffic passing through the device
  • Use of the compromised router as a pivot point for attacks on internal network hosts
  • Participation of the router in botnets or large-scale distributed attacks

General mitigation guidance

Effective mitigation focuses on removing direct command injection opportunities and reducing the trust boundary around network-exposed parameters:

  • Replace dynamic shell invocation with safer APIs that execute predefined binaries using argument arrays rather than shell parsing.
  • Enforce strict input validation on parameters like pin, using whitelisting to accept only expected formats (e.g., fixed length numeric strings) and rejecting any unexpected characters.
  • Avoid passing user-supplied data through shell interpreters; when shell usage is unavoidable, apply robust escaping routines and reject any metacharacters that are not explicitly required.
  • Separate privilege domains so that components processing external input run with the least privileges necessary, limiting the blast radius of a successful injection.
  • Harden management interfaces by restricting exposure (e.g., LAN-only access, network segmentation, disabling unnecessary remote management features) to narrow the attack surface.

How teams detect issues like this

Detection typically combines code-centric and operational techniques:

  • Static analysis: Configure security linters and SAST tools to flag shell command construction that interpolates request parameters or other untrusted data, especially in router firmware scripts and CGI handlers.
  • Code review: Look for patterns such as system(), popen(), backticks, eval in scripts, or shell command strings built from concatenated request fields like pin; ensure arguments are validated and passed as discrete parameters rather than a single interpolated string.
  • Policy enforcement: Adopt internal coding standards that prohibit direct shell execution with raw user input and require input validation/encoding at trust boundaries.
  • Runtime monitoring: Where feasible, monitor for unusual command-line invocations on embedded devices (e.g., unexpected processes, sudden spikes in outbound connections), although this is often constrained on consumer routers.

Sources

SourceLink
github.comgithub.com/utmost3/cve/issues/2
vuldb.comvuldb.com/submit/797086
vuldb.comvuldb.com/vuln/359544
vuldb.comvuldb.com/vuln/359544/cti
linksys.comlinksys.com/

Frequently asked

questions

It can be, depending on how the router is configured. If the vulnerable JNAP or management interface is exposed over WAN (remote management, port forwarding, or misconfiguration), remote exploitation from the internet is possible. If it is only reachable from the local network, exploitation is generally limited to local attackers or devices already inside the network.

The attacker needs network access to send requests to the vulnerable endpoint and control over the pin parameter. No valid user credentials may be necessary if the endpoint is accessible without authentication, but the exact requirement depends on the device's configuration and access controls.

The safest pattern is to avoid constructing shell commands from user input entirely. Replace shell invocations with direct calls to underlying functionality via safe APIs, and where command execution is unavoidable, pass arguments as separate, validated parameters without shell interpretation and enforce strict allowlists on input.

Prevention relies on designing components so that untrusted data never influences command parsing: apply strong input validation at all external interfaces, standardize on safe command-execution wrappers that disallow shell usage, adopt secure coding guidelines for embedded scripts, and integrate automated security reviews (SAST, linters, and security-focused code review) into the development lifecycle.

Find out what's already
exploitable in your codebase.