Skip to content
RCE Advisory Intermediate CVE-2019-5167CVE-2019-5168CVE-2019-5169CVE-2019-5170CVE-2019-5171CVE-2019-5172CVE-2019-5173CVE-2019-5174CVE-2019-5175

WAGO PFC200 iocheckd service "I/O-Check" cache Multiple Command Injection Vulnerabilities

The iocheckd service on WAGO PFC200 controllers parses a globally writable XML cache file and passes several of its values to shell commands without sanitisation. An attacker who can write that file could inject OS commands that run as root, leading to privilege escalation.

Kelly Leuschner Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable command injection vulnerability exists in the iocheckd service “I/O-Check” function of the WAGO PFC 200. A specially crafted XML cache file written to a specific location on the device can be used to inject OS commands.

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

The service builds shell command strings with sprintf() using unsanitised XML node contents and then executes them via system().

Impact

Any local user could escalate to root by writing the cache file and triggering its parsing, and the text notes the service can also be reached over the network.

What the attacker needed

Write access to /tmp on the device; ability to send a BC_SaveParameter message

The fix

The report only offers mitigations: disable the iocheckd service or disable its caching; it does not describe a code fix.

How it was found

  1. Write a malicious XML file to /tmp/iocheckCache.xml containing command injection in a network parameter.
  2. Send a BC_SaveParameter message to the iocheckd service to trigger parsing of the cache file.
  3. The injected commands execute as the root user.

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 background service that reads a settings file stored in a shared temporary folder. That folder is writable by any user, and the service inserts the file's values directly into commands it runs as the administrator account. So anyone who can put a file there can make the device run their own commands with the highest privileges.

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.