WAGO PFC200 Cloud Connectivity TimeoutPrepared Command Injection Vulnerability
The cloud connectivity firmware update handler on the WAGO PFC200 passes the TimeoutPrepared value from a cloud command into a shell command without escaping it. An attacker able to send a crafted firmware update command could run operating system commands as the iot user on the device.
Originally disclosed on Cisco Talos
An exploitable command injection vulnerability exists in the cloud connectivity functionality of WAGO PFC200. An attacker can inject operating system commands into the TimeoutPrepared parameter value contained in the firmware update command.
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 TimeoutPrepared value from the cloud firmware update command is concatenated into a shell command string and passed to system() without escaping or validation.
Impact
An attacker with web administrator privileges could execute arbitrary OS commands as the iot user on the controller, though the text notes that web administrator privileges are required to configure the Cloud Connectivity service.
What the attacker needed
Web administrator access to the device; Cloud Connectivity service enabled; ability to send a firmware update command
The fix
The vulnerability could be mitigated by disabling the Cloud Connectivity feature through the web-based management application.
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 placed directly into a command the device runs on its own operating system. Because special characters in that value are not neutralised, someone who can send the update command can make the device run extra commands of their choosing.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.