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.
Originally disclosed on Cisco Talos
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.
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
- Configure the Cloud Connectivity service on the controller (requires web administrator privileges).
- Send a Firmware Update command through the cloud connection containing a crafted TimeoutUnconfirmed value.
- The value is stored on disk and later read back by the firmware update tool.
- 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.