Skip to content
Memory corruption Advisory Advanced CVE-2019-5176CVE-2019-5177CVE-2019-5178CVE-2019-5179CVE-2019-5180CVE-2019-5181CVE-2019-5182

WAGO PFC200 iocheckd service "I/O-Check" cache Multiple Code Execution Vulnerabilities

The iocheckd service on WAGO PFC200 controllers parses a globally writable XML cache file and copies several field values into fixed-size stack buffers without length checks, causing stack buffer overflows. An attacker who can write that file and send a specific message could execute code on the device.

Kelly Leuschner Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable stack buffer overflow vulnerability vulnerability exists in the iocheckd service “I/O-Check” functionality of WAGO PFC 200. A specially crafted XML cache file written to a specific location on the device can cause a stack buffer overflow, resulting in code execution.

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 uses sprintf to copy XML node contents into fixed-size stack buffers without checking input length.

Impact

An attacker could cause a stack buffer overflow leading to code execution on the device.

What the attacker needed

Write access to /tmp/iocheckCache.xml; ability to send a message to the iocheckd service

The fix

The vulnerability could be mitigated by disabling the iocheckd service or disabling iocheckd caching.

How it was found

  1. Write a malicious XML file to /tmp/iocheckCache.xml.
  2. Send the BC_SaveParameter message to trigger parsing of the cache file.
  3. The service copies the oversized field into a stack buffer and crashes or executes code.

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.

A program on the controller reads a settings file that any user can change. It copies long text from that file into a small fixed-size space in memory without checking the length, so the extra text spills over and can overwrite the program's control data. This lets someone who can edit the file run their own code on the device.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

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.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.