Security Advisory: Remote Command Execution on Netcomm NTC 6200 and NWL 222 | ONEKEY Research
Multiple CGI scripts on Netcomm NTC 6200 and NWL 222 devices pass unsanitised query string parameters to the shell's eval, allowing arbitrary command injection. An attacker could execute commands as root, aided by hardcoded default credentials.
onekey.com
Published on onekey.com
Example H2
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
Remote unauthenticated attackers can gain arbitrary command execution with elevated privileges (root) on affected devices; default credentials make exploitation easier, and vendor fixes up to [redacted] were found insufficient.
What the attacker needed
Network access to the device web interface; default credentials unchanged (optional)
The fix
A definitive fix was not available at publication; Lantronix's attempted fixes were insufficient, and the advisory recommends upgrading when a fix is published, changing default credentials, and limiting network exposure.
How it was found
- Send an HTTP request to one of the vulnerable CGI scripts, such as ssh.cgi, with a crafted query string containing a command substitution.
- The script reads the query string into the qlist variable and builds shell variables from it.
- The script calls eval on the constructed string, executing the injected command.
- If default credentials are still in place, authenticate with them to reach the endpoint.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The web interface of these routers runs small shell scripts that take values from the URL and run them as commands. Because the scripts do not check those values, an attacker can put extra commands in the URL and the device will run them with the highest privileges. Default passwords like admin:admin make it even easier to reach the vulnerable pages.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.