Moxa AWK-3131A Multiple Features Login Username Parameter OS Command Injection Vulnerability
The login username field of the Telnet, SSH and console services was passed into a shell command used to log failed authentication attempts, so an unauthenticated attacker could run operating system commands as root. This gave remote root-level command execution, and the authors confirmed it on Telnet, SSH and the console port.
Originally disclosed on Cisco Talos
An exploitable OS Command Injection vulnerability exists in the Telnet, SSH, and console login functionality of Moxa AWK-3131A Industrial IEEE 802.11a/b/g/n wireless AP/bridge/client in firmware versions 1.4 to 1.7 (current). An attacker can inject commands via the username parameter of several services (SSH, Telnet…
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The failed-login logging code formats the username into a command string and passes it to system(), so shell metacharacters in the username are executed.
Impact
An unauthenticated attacker could execute commands as root remotely over Telnet or SSH, or locally via the console port; the web interface was suspected but not confirmed vulnerable.
What the attacker needed
Network access to Telnet or SSH; or physical access to console port
The fix
The text gives no vendor fix; it recommends disabling SSH, Telnet and the web application before deployment and restricting physical access to the console port.
How it was found
- Connect to the Telnet or console login prompt.
- Enter a username containing a shell command wrapped in backticks.
- The device runs the command as root when it logs the failed login.
- For SSH, escape the backticks with backslashes in the username.
- Redirect output to stderr to see the command's output on the console.
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 report has not been written yet. The Original tab links to the source.
When you log in, the device writes your username into a log message. It builds that message as a shell command and runs it, so special characters in the username are treated as commands rather than plain text. Because the login runs as the most powerful user (root), anyone who can reach the login prompt can run their own commands without a password.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.