/

CVE-2026-18600

Severity:

HIGH RISK

(8.8)

Command Injection (CWE-77) in GL.iNet Network RPC

CVE-2026-18600

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-74, CWE-77

Impact:

Remote Code Execution on Network Device

Severity:

HIGH RISK

(8.8)

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 GL.iNet GL-MT3000's Network Lua RPC plugin allows crafted switch parameters to be interpreted as shell commands.

When exposed over the network, an attacker can remotely execute system commands on the device by abusing the network.switch_info and network.switch_status RPC functions.

Affected context

This vulnerability arises in GL.iNet GL-MT3000 devices running firmware up to version 4.4.5 that use the /usr/lib/oui-httpd/rpc/network Lua RPC plugin.

Specifically, the network.switch_info and network.switch_status functions process a switch argument that is passed in a way that can influence shell command execution.

The issue is most relevant when the RPC interface is reachable from untrusted networks, such as WAN or guest LAN segments, or when local attackers can issue crafted RPC calls through the web or API layer.

Exploit preconditions

  • Attack surface: The HTTP/Lua RPC interface exposed by oui-httpd and the network RPC module on the GL-MT3000 router.
  • Required access: Ability to send crafted requests to the Network Lua RPC plugin (e.g., via the web interface or direct RPC endpoint), depending on how authentication and firewall rules are configured.
  • Trigger point: Invocation of network.switch_info or network.switch_status with a malicious switch parameter that is later embedded into a shell command.
  • Why exploitation is possible: The switch argument is not adequately validated, encoded, or constrained before being combined with shell commands, enabling injection of additional command syntax that the system interpreter executes.

Why this happens

The underlying bug class is command injection, where untrusted input is concatenated or interpolated into shell commands without proper neutralization.

In this case, the Lua RPC functions for network switch handling treat the switch parameter as a trusted value and pass it into shell-based utilities or scripts.

This behavior maps to CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') and is closely related to CWE-74: Improper Neutralization of Special Elements in Output, as user-controlled data influences command output without strict validation or whitelisting.

Abstractly, the insecure pattern is: using user-supplied identifiers directly in command strings or system calls instead of treating them as data and limiting them to safe, predefined values.

Potential impact

  • Remote execution of arbitrary system commands on the router
  • Complete compromise of the GL-MT3000 device's operating system environment
  • Modification of network configuration, routing rules, and firewall policies
  • Interception or redirection of user traffic traversing the router
  • Deployment of persistent malware or backdoors on the device
  • Lateral movement to other devices on the local network

General mitigation guidance

Effective mitigation focuses on treating all RPC parameters as untrusted input and avoiding direct command construction from user data.

Pattern-based defenses include:

  • Replacing shell command construction with safe APIs or system calls that accept structured parameters rather than raw command strings.
  • Constraining the switch argument to a small, predefined set of allowed identifiers and rejecting all other values.
  • Applying rigorous input validation on RPC parameters, including character whitelisting and rejecting any command metacharacters.
  • Avoiding shell interpretation entirely where possible by using native libraries or internal functions for network and switch management.
  • Running web/RPC components with least privilege, limiting their ability to affect sensitive system state if compromised.

How teams detect issues like this

Organizations can detect similar command injection issues by:

  • Applying static analysis rules that flag string concatenation or interpolation used in calls to os.execute, io.popen, system, or equivalent shell-invoking APIs in Lua or C.
  • Reviewing RPC handler code for patterns where user-controlled parameters (such as switch) flow directly into command strings or script invocations.
  • Enforcing secure coding policies that disallow dynamic shell construction in RPC or web handlers, verified via automated code review tools in CI/CD.
  • Conducting focused penetration tests and fuzzing of HTTP/RPC endpoints with special characters, command separators, and unexpected parameter values to identify injection behavior.

Sources

SourceLink
github.comgithub.com/StrTzz123/iot_vul/blob/main/GL-iNet/MT3000/4.4.5/network_switch_info_rpc_rce/CVE.md
vuldb.comvuldb.com/cve/CVE-2026-18600
vuldb.comvuldb.com/submit/851537
vuldb.comvuldb.com/vuln/385515
vuldb.comvuldb.com/vuln/385515/cti

Frequently asked

questions

Yes, it can be remotely exploitable if the RPC interface or associated web endpoints are reachable from an untrusted network and the attacker can send crafted requests with a malicious switch parameter.

An attacker needs the ability to interact with the Network Lua RPC plugin, which may require network reachability and, depending on deployment, authentication to the router's administrative interface or any exposed API that proxies these calls.

The safest fix is to eliminate shell command construction from user-controlled input entirely by using parameterized, non-shell APIs for network operations and strictly whitelisting allowed switch values, rejecting any unexpected input.

Future prevention relies on adopting secure coding practices: treat all external input as untrusted, avoid dynamic shell execution in router and RPC code, enforce strict validation and whitelisting, and integrate automated security checks and code reviews that specifically look for injection-prone patterns.

Find out what's already
exploitable in your codebase.