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_portordest_ipvalues - 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.

