Skip to content
RCE Advisory Advanced CVE-2019-5157

WAGO PFC200 Cloud Connectivity TimeoutUnconfirmed Command Injection Vulnerability

The Cloud Connectivity firmware update handler passes the TimeoutUnconfirmed value from a cloud command into a shell command without escaping it. An attacker able to send that command could run arbitrary OS commands as the iot user on the controller.

Kelly Leuschner Follow

Originally disclosed on Cisco Talos

High 7.2 View original

An exploitable command injection vulnerability exists in the Cloud Connectivity functionality of WAGO PFC200. An attacker can inject OS commands into the TimeoutUnconfirmed parameter value contained in the Firmware Update command.

Kelly Leuschner, 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

Likely, the TimeoutUnconfirmed value is read from the cloud command and appended to a shell command string without escaping before being passed to system().

Impact

An attacker with the ability to send the firmware update command could execute arbitrary OS commands as the iot user, giving high confidentiality, integrity and availability impact.

What the attacker needed

Web administrator access to configure cloud; ability to send firmware update command

The fix

The vulnerability could be mitigated by disabling the Cloud Connectivity feature through the web management application.

How it was found

  1. Configure the Cloud Connectivity service on the controller (requires web administrator privileges).
  2. Send a Firmware Update command through the cloud connection containing a crafted TimeoutUnconfirmed value.
  3. The value is stored on disk and later read back by the firmware update tool.
  4. The value is appended unescaped to a shell command and executed via system().

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.

This device accepts firmware update instructions from a cloud service. One of the settings in that instruction, a timeout value, is pasted straight into a command the device runs on its own operating system. Because the value is not cleaned first, someone who can send that instruction can slip in extra commands and have the device run them.

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 Kelly Leuschner

View all

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