Skip to content
RCE Advisory Advanced CVE-2021-21868

CODESYS Development System ObjectManager.plugin Project.get_MissingTypes() Unsafe Deserialization vulnerability

The CODESYS Development System deserialises the missingtypeinformation.auxiliary file inside a project using .NET BinaryFormatter without validating the data. An attacker can craft a malicious project file that, when opened, executes arbitrary code on the victim's machine.

Patrick DeSantis Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An unsafe deserialization vulnerability exists in the ObjectManager.plugin Project.getMissingTypes() functionality of CODESYS GmbH CODESYS Development System 3.5.16 and 3.5.17. A specially crafted file can lead to arbitrary command execution.

Patrick DeSantis, 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 application uses .NET BinaryFormatter.Deserialize on an auxiliary file from an untrusted project without any validation or safe deserialisation controls.

Impact

An attacker could execute arbitrary commands on the victim's machine with the privileges of the user opening the project.

What the attacker needed

Victim opens a malicious project file

How it was found

  1. Create or obtain a CODESYS project file.
  2. Modify the missingtypeinformation.auxiliary file inside the project with malicious serialised data.
  3. Open the modified project in CODESYS Development System.
  4. The application deserialises the auxiliary file and executes the attacker's payload.

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.

When a program opens a file, it sometimes converts stored data back into objects, a process called deserialisation. If the program trusts the file completely, an attacker can include data that makes the program run their own commands. Here, opening a tampered project file could let an attacker run code on the victim's computer.

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 Patrick DeSantis

View all

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