/

CVE-2026-18684

Severity:

CRITICAL RISK

(9.8)

Command Injection (CWE-77) in GL.iNet GL-MT3000 Router

CVE-2026-18684

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-74, CWE-77

Impact:

Remote Code Execution on Network Router

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

A command injection vulnerability in the GL.iNet GL-MT3000 router allows crafted input to the remove_profile function in /cgi-bin/glc to be executed as system commands via the modem.so component.

When exposed remotely, this weakness can let an attacker run arbitrary commands on the device, leading to full compromise of the router and any traffic it handles.

Affected context

The issue occurs in GL.iNet GL-MT3000 devices where the web management interface and associated CGI endpoints are reachable to an attacker, either directly from the internet or through local network access.

Specifically, the remove_profile functionality in /cgi-bin/glc within the modem.so component processes user-controlled data without robust command construction safeguards.

The vulnerability is relevant in deployments that rely on web-based configuration of modem profiles and do not restrict access to the router's administrative interface.

Exploit preconditions

  • Attack surface: HTTP/HTTPS interface exposing /cgi-bin/glc on the GL-MT3000 router
  • Required access: Network-level ability to send requests to the router's web UI (WAN or LAN, depending on configuration)
  • Trigger point: Invocation of the remove_profile function with crafted parameters that are incorporated into shell command execution
  • Why exploitation is possible: User-supplied data is embedded into command lines without proper neutralization or separation from control characters, enabling injection of additional shell commands

Why this happens

The underlying bug follows the command injection pattern captured in 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 Used by a Downstream Component.

In abstract terms, a server-side function accepts user-controlled input and constructs shell commands or passes parameters to a command interpreter without enforcing strict validation, escaping, or using safe, parameterized APIs.

Because the command construction trusts the input and allows shell metacharacters or command separators, attackers can alter the intended command structure and cause arbitrary code execution under the router's privilege context.

Potential impact

  • Remote attackers may execute arbitrary system commands on the router.
  • The device configuration could be altered, reset, or locked to unauthorized users.
  • Network traffic passing through the router can be monitored, redirected, or blocked.
  • Malware or persistent backdoors could be installed on the router's firmware environment.
  • The compromised router can be leveraged as a pivot point for attacks against internal network hosts.

General mitigation guidance

Effective mitigation focuses on eliminating direct shell command construction from user input and reducing the trust placed in web management traffic.

Common defensive patterns include:

  • Replacing shell command concatenation with safer, parameterized system interfaces or dedicated APIs that separate code from data.
  • Strictly validating and constraining profile identifiers and similar parameters to whitelisted formats (e.g., fixed character sets, length limits, and structural rules).
  • Applying robust input neutralization when interaction with command interpreters is unavoidable, ensuring special characters and control sequences are not processed as commands.
  • Running management processes with least privilege and minimizing the commands they can invoke to limit blast radius if a flaw emerges.
  • Restricting external access to the administrative web interface through firewall rules, VPN, or management VLANs so that only trusted users can reach sensitive endpoints.

How teams detect issues like this

Organizations and vendors can detect similar command injection issues through:

  • Static analysis that flags uses of shell execution APIs (e.g., system, popen, backticks) with unsanitized or concatenated user input.
  • Code review checklists that require explicit justification and defensive handling for any command-line construction in web or network-exposed components.
  • Security testing that fuzzes CGI endpoints and management interfaces with payloads containing command separators and shell metacharacters to see if they alter system behavior.
  • Policy-based enforcement in CI/CD pipelines to block deployment of code that uses risky command execution patterns without an approved safe wrapper.
  • Incorporating automated SAST/DAST tools that specialize in detecting injection vulnerabilities in router and embedded web interface code.

Sources

SourceLink
github.comgithub.com/StrTzz123/iot_vul/tree/main/GL-iNet/MT3000/4.4.5/modem_remove_profile_glc_rce
vuldb.comvuldb.com/cve/CVE-2026-18684
vuldb.comvuldb.com/submit/851581
vuldb.comvuldb.com/vuln/385610
vuldb.comvuldb.com/vuln/385610/cti

Frequently asked

questions

Exploitability depends on whether the router's web interface is reachable to the attacker. If the management UI or CGI endpoint is exposed over WAN or accessible to untrusted clients on the LAN, the issue can be exploited remotely with relatively low effort.

The attacker needs network-level access to send HTTP/HTTPS requests to the GL-MT3000's web interface. They typically do not require prior authentication if the vulnerable function is reachable without strict access controls or if credentials are weak or shared.

The safest pattern is to eliminate shell-based command construction from user input entirely. Use strongly-typed system APIs, enforce strict validation and whitelisting of parameters, and ensure that no user-controlled data is passed directly to command interpreters.

Prevention involves adopting secure coding practices for embedded web interfaces: banning direct use of shell commands with dynamic input, integrating security reviews and automated analysis into development workflows, restricting exposure of management endpoints, and designing components so that configuration changes never require passing raw user data into command interpreters.

Find out what's already
exploitable in your codebase.