/

CVE-2026-18612

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-77) in GL-MT3000 Plugins

CVE-2026-18612

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-74, CWE-77

Impact:

Remote Code Execution on Network Appliance

Severity:

CRITICAL RISK

(9.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

GL-iNet GL-MT3000 routers contain a command injection flaw in the native plugins interface, allowing attacker-controlled input to be executed as system commands via the /cgi-bin/glc endpoint.

When exposed to remote access, this issue can let an attacker run arbitrary commands on the device, leading to full router compromise and downstream network attacks.

Affected context

The vulnerability appears in GL-MT3000 deployments that expose the web management or plugin APIs, particularly the plugins.remove_package and plugins.install_package functions in the plugins.so Native Plugin via /cgi-bin/glc.

It tends to surface when user-supplied parameters for plugin operations are passed into shell commands without robust sanitization or neutralization, especially in environments where router administration interfaces are reachable from untrusted networks or via remote access features.

Exploit preconditions

  • Attack surface: HTTP(S) requests to the router's /cgi-bin/glc endpoint handling plugin management.
  • Required access: Ability to send crafted requests to the plugin functions (e.g., plugins.remove_package or plugins.install_package); authentication requirements depend on the router's configuration.
  • Trigger point: Invocation of plugin management operations where user-controlled parameters are concatenated into or passed through system shell execution.
  • Why exploitation is possible: Input destined for command arguments is not properly neutralized or constrained, allowing shell metacharacters or command sequences to be interpreted by the underlying OS rather than treated as data.

Why this happens

This flaw stems from building or invoking OS-level shell commands with untrusted input in the plugin handling logic, typically via APIs like system(), popen(), or equivalent wrappers that treat the constructed string as executable shell syntax.

The behavior aligns with CWE-77 (Improper Neutralization of Special Elements used in a Command) and CWE-74 (Improper Neutralization of Special Elements in Output), where user-controlled values are embedded directly into command strings or output contexts without strict validation, escaping, or parameterization.

Abstractly, the insecure pattern is: application features that administer packages or plugins accept free-form strings and then interpolate these into shell commands without enforcing a whitelist of allowed values, thereby transforming configuration input into a code execution channel.

Potential impact

  • Remote execution of arbitrary OS commands on the router
  • Complete compromise of the device's operating system and configuration
  • Modification of DNS, routing, or firewall rules to intercept or redirect traffic
  • Installation of persistent malware or backdoors on the router
  • Use of the router as a pivot point for attacks against internal network hosts
  • Exfiltration or manipulation of network traffic passing through the device

General mitigation guidance

Effective mitigation focuses on eliminating direct shell command construction with user-controlled values and constraining plugin operations to safe, parameterized interfaces.

Patterns that help include:

  • Replacing shell-based invocation with APIs or libraries that accept structured parameters rather than raw command strings.
  • Applying strict allowlists for plugin names, package identifiers, and operation types, rejecting any input outside expected formats.
  • Normalizing and validating all user-originated data before use, disallowing shell metacharacters and sequences that alter command flow.
  • Running management components with least privilege so that, even if a command is abused, its impact is limited.
  • Designing plugin and package workflows to operate on predefined repositories and identifiers instead of arbitrary paths or command fragments.

How teams detect issues like this

Detection commonly involves a mix of code-centric and behavioral approaches:

  • Static analysis rules targeting use of shell execution APIs (system, popen, backticks, os.system, etc.) with concatenated or formatted strings derived from HTTP request parameters.
  • Code review checklists that flag any plugin or package management features building command lines from user input, especially in CGI or native modules.
  • Security testing that sends payloads containing shell metacharacters to plugin-related endpoints to verify whether they are executed or safely rejected.
  • Runtime monitoring and logging of unusual command executions, unexpected processes, or anomalous traffic patterns originating from router management components.
  • Policy enforcement in CI/CD that prevents merging changes introducing new direct shell invocations without proper sanitization or replacement with safer APIs.

Sources

SourceLink
github.comgithub.com/StrTzz123/iot_vul/blob/main/GL-iNet/MT3000/4.4.5/plugins_package_name_glc_rce/CVE.md
vuldb.comvuldb.com/cve/CVE-2026-18612
vuldb.comvuldb.com/submit/851553
vuldb.comvuldb.com/submit/851596
vuldb.comvuldb.com/submit/851597
vuldb.comvuldb.com/submit/851600
vuldb.comvuldb.com/vuln/385532
vuldb.comvuldb.com/vuln/385532/cti

Frequently asked

questions

Exploitability depends on whether the affected management endpoint is reachable from untrusted networks and whether authentication is enforced. In configurations where the web interface or plugin API is exposed, an attacker who can send requests to /cgi-bin/glc may be able to trigger command injection.

At minimum, the attacker must be able to reach the router's HTTP(S) interface and interact with the plugin operations. Some setups may also require valid credentials, while misconfigurations or remote management features can broaden access to unauthenticated users.

The robust fix pattern is to remove direct shell command construction using user-supplied data and instead rely on parameterized system APIs or dedicated package-management libraries. When shell execution is unavoidable, enforce strict allowlists, rigorous validation, and proper escaping so that user data cannot alter command structure.

Future components should treat all external input as untrusted, avoid shell interpretation of concatenated strings, and adopt secure coding standards that mandate parameterized calls, input validation, and least-privilege execution. Integrating static analysis, security-focused code review, and regular penetration testing into the development lifecycle helps catch command injection patterns early.

Find out what's already
exploitable in your codebase.