/

CVE-2026-18599

Severity:

HIGH RISK

(8.0)

Command Injection (CWE-77) in GL.iNet Logread Plugin

CVE-2026-18599

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-74, CWE-77

Impact:

Remote Command Execution on Router OS

Severity:

HIGH RISK

(8.0)

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 Logread Lua RPC plugin of GL.iNet GL-MT3000 routers allows arbitrary system commands to be executed via the record_size argument to logread.set_config.

When an attacker can reach the vulnerable RPC interface and supply crafted input, they may gain high-impact control over the device's operating system.

Affected context

This vulnerability occurs in GL.iNet GL-MT3000 devices running firmware up to 4.4.5 within the Logread Lua RPC Plugin.

It is exposed when the logread.set_config RPC method is reachable over the device's management or API interface and accepts user-controlled record_size values.

The issue is most relevant in deployments where the router's administrative interfaces are accessible from untrusted networks or where local clients can issue RPC calls to the logread service.

Exploit preconditions

  • Attack surface: The Logread Lua RPC interface on GL.iNet GL-MT3000 (e.g., management/API endpoint).
  • Required access: Ability to call logread.set_config and control the record_size parameter (via HTTP/RPC or similar mechanism).
  • Trigger point: Invocation of the logread configuration update that passes record_size into an underlying shell or command-building routine.
  • Why exploitation is possible: The input is incorporated into shell command context without sufficient sanitization or quoting, enabling injection of additional command fragments.

Why this happens

The underlying bug class aligns with CWE-77: Command Injection and CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.

The Logread Lua RPC plugin's logread.set_config function treats the record_size argument as trusted data and feeds it into command execution or shell-style constructs without robust neutralization of metacharacters.

This insecure pattern allows attacker-controlled input to escape intended parameter boundaries and be interpreted as executable shell syntax by the downstream command processor.

Potential impact

  • Full execution of arbitrary system commands on the router operating system
  • Modification of device configuration, firewall rules, and network routing behavior
  • Installation of persistent malware or backdoors on the device
  • Interception, redirection, or logging of network traffic passing through the router
  • Use of the compromised router as a pivot point for attacks against internal networks

General mitigation guidance

Effective mitigation centers on preventing user-controlled data from entering command execution contexts and reducing trust in management inputs.

Common defensive patterns include:

  • Avoiding shell-based command construction; prefer direct API calls or library functions that do not interpret shell syntax.
  • Strictly validating and constraining parameters such as sizes, identifiers, and flags to well-defined ranges and types before use.
  • Applying consistent encoding or escaping for any data that must be passed to a command interpreter, ensuring special characters are neutralized.
  • Running management and RPC services with least-privilege accounts and minimizing their access to sensitive system utilities or configuration files.
  • Restricting exposure of administrative and RPC interfaces, using network segmentation and strong authentication to reduce untrusted input sources.

How teams detect issues like this

Organizations can detect similar command injection risks by:

  • Applying static analysis rules that flag concatenation of user-controlled data into shell commands, system calls, or os.execute-style APIs.
  • Reviewing RPC handlers and management endpoints for parameters that are passed directly into command line strings or interpreter contexts.
  • Enforcing secure coding policies that prohibit shell-based command construction and require parameterized or API-based operations instead.
  • Leveraging automated security testing tools (SAST/DAST) configured to search for injection patterns in Lua, C, and related router firmware codebases.
  • Incorporating targeted penetration tests against management interfaces to exercise edge-case inputs and identify unsafe command usage paths.

Sources

SourceLink
github.comgithub.com/StrTzz123/iot_vul/blob/main/GL-iNet/MT3000/4.4.5/logread_set_config_rpc_rce/CVE.md
vuldb.comvuldb.com/cve/CVE-2026-18599
vuldb.comvuldb.com/submit/851536
vuldb.comvuldb.com/vuln/385514
vuldb.comvuldb.com/vuln/385514/cti

Frequently asked

questions

Exploitability depends on how the Logread RPC interface is exposed. If the management or API endpoint is reachable from untrusted networks or shared LANs, attackers with network access can potentially exploit it remotely. In more locked-down environments, exploitation may be limited to local or authenticated users.

The attacker must be able to invoke the logread.set_config function and control the record_size parameter, typically via the router's RPC or HTTP management interface. Access requirements vary by deployment, but any account or mechanism capable of sending these requests is in scope.

The safest pattern is to eliminate shell-dependent command execution paths altogether and replace them with direct, parameterized system APIs. Where commands are unavoidable, inputs should be rigorously validated against strict numeric or enumerated constraints and passed through safe argument APIs rather than string concatenation.

Future implementations should adopt a secure-by-default design that treats all external input as untrusted, forbids dynamic shell command building, and enforces centralized validation routines for management parameters. Integrating security-focused code review, static analysis, and injection-specific tests into the development lifecycle helps prevent these patterns from entering production firmware.

Find out what's already
exploitable in your codebase.