/

CVE-2026-19982

Severity:

HIGH RISK

(7.4)

OS Command Injection (CWE-78) in GL.iNet Firewall RPC

CVE-2026-19982

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.4)

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 high-severity command injection vulnerability in the GL.iNet BE9300 and MT6000 firewall-management RPC can allow attacker-controlled network parameters to influence operating-system command execution.

The risk arises when remotely supplied dest_port or dest_ip values are processed without sufficient separation from shell commands, potentially enabling unauthorized actions on the router.

Affected context

The vulnerability occurs in the firewall-management RPC functionality of affected GL.iNet BE9300 and MT6000 devices running vulnerable 4.8.x firmware.

It becomes risky when the RPC is remotely reachable and accepts attacker-influenced dest_port or dest_ip values that are incorporated into operating-system command execution without adequate validation or safe argument handling. Actual exposure depends on network access controls, authentication, and device configuration.

Exploit preconditions

  • Attack surface: Firewall-management RPC exposed through a reachable device interface
  • Required access: Network access to the RPC; authentication requirements depend on deployment configuration
  • Trigger point: Processing firewall-management requests containing dest_port or dest_ip values
  • Why exploitation is possible: User-controlled values may reach an operating-system command construction or execution path without sufficient isolation from command syntax

Why this happens

The underlying bug is an OS command injection pattern in which externally influenced data is passed into a shell or command interpreter as part of a firewall-management operation.

If input values are concatenated into command strings rather than passed as isolated, validated arguments, shell metacharacters or unexpected syntax may alter the intended command behavior. This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with CWE-77: Improper Neutralization of Special Elements in Output Used by a Downstream Component describing the broader command-construction weakness.

Potential impact

  • An attacker may execute unauthorized operating-system commands on the affected router
  • Device configuration or firewall rules could be altered
  • Network traffic may be redirected, blocked, or exposed
  • Sensitive device or network information could be accessed
  • The router could be used to attack other systems on connected networks

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from firewall-management operations and reducing trust in RPC parameters.

Common defensive patterns include:

  • Passing arguments through APIs that do not invoke a shell
  • Applying strict allowlist validation for IP addresses, ports, and accepted formats
  • Rejecting unexpected characters, encodings, ranges, and delimiters before processing
  • Keeping firewall-management RPC interfaces inaccessible from untrusted networks
  • Enforcing authentication, authorization, and least privilege for management operations
  • Using secure-by-default network exposure and administrative access policies
  • Separating input validation from command construction and applying validation at the final trust boundary

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying string concatenation or interpolation in shell-command execution paths
  • Code review checks for RPC parameters reaching process-spawning, shell, or system-command APIs
  • Tests using boundary values and unexpected characters to verify strict parameter rejection
  • Runtime monitoring for unusual firewall-management requests or unexpected child processes
  • Network policy checks confirming that administrative RPC endpoints are not broadly exposed
  • CI security policies that flag command execution with unsanitized request-derived input

Automated code review and software composition tools may help identify suspicious command-construction patterns, but findings should be validated against the actual execution path.

Sources

SourceLink
github.comgithub.com/gl-inet/CVE-issues/blob/main/4.0.0/Firewall%20Cleanup%20RCE.md
vuldb.comvuldb.com/cve/CVE-2026-19982
vuldb.comvuldb.com/submit/873918
vuldb.comvuldb.com/vuln/391164
vuldb.comvuldb.com/vuln/391164/cti

Frequently asked

questions

It may be remotely exploitable when the firewall-management RPC is reachable by an attacker and accepts the affected parameters. Exposure depends on network placement, access controls, and authentication.

Not necessarily. The required access depends on how the RPC is exposed and protected in the deployment. Network reachability alone may be sufficient if authorization controls are absent or ineffective.

The safest pattern is to avoid shell invocation for firewall operations, pass validated values as separate arguments, and enforce strict allowlists for IP addresses and ports.

Treat RPC input as untrusted, apply validation at trust boundaries, restrict management interfaces to authorized networks, use least privilege, and include command-injection checks in code review and automated testing.

Find out what's already
exploitable in your codebase.