Skip to content
RCE Advisory Intermediate CVE-2019-5140

Moxa AWK-3131A iw_webs DecryptScriptFile file name Command Injection Vulnerability

The diagnostic script file name in the iw_webs functionality is passed unescaped into a system call, so a low-privilege authenticated user can inject shell commands. This gives remote control over the device.

Carl Hurd Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable command injection vulnerability exists in the iwwebs functionality of the Moxa AWK-3131A firmware version 1.13. A specially crafted diagnostic script file name can cause user input to be reflected in a subsequent iwsystem call, resulting in remote control over the device.

Carl Hurd and Jared Rittle, on Cisco Talos

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 file name is inserted into a shell command string passed to iw_system without escaping or filtering special characters.

Impact

An authenticated low-privilege attacker could execute arbitrary commands on the device, gaining full control of confidentiality, integrity and availability.

What the attacker needed

Authenticated low-privilege account; access to the diagnostic script upload

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.

The device runs a command-line program to decrypt a diagnostic script, and it builds that command by pasting in the file name the user supplied. Because special characters in the name are not neutralised, the device ends up running extra commands the attacker wrote. Anyone logged in with even a low-privilege account can use this to take over the appliance.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Carl Hurd

View all

6 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.