CODESYS Development System ComponentModel Profile.FromFile() Unsafe Deserialization vulnerability
The CODESYS Development System loads profile files using .NET's BinaryFormatter, which is unsafe for untrusted data. A crafted profile file could let an attacker run arbitrary commands when the application loads it.
Originally disclosed on Cisco Talos
An unsafe deserialization vulnerability exists in the ComponentModel Profile.FromFile() functionality of CODESYS GmbH CODESYS Development System 3.5.16 and 3.5.17. A specially crafted file can lead to arbitrary command execution.
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 deserialises profile files with .NET BinaryFormatter, which is unsafe for untrusted input.
Impact
An attacker who supplies a malicious profile file could achieve arbitrary command execution when the victim loads it, though the exploit requires user interaction.
What the attacker needed
Victim opens or loads a malicious profile file
The fix
The vendor patched the issue; the underlying fix is to stop using BinaryFormatter for untrusted profile files.
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.
Some programs save data by turning objects into a stream of bytes and reading them back later, a process called deserialisation. The .NET BinaryFormatter does this in a way that can be tricked: a malicious file can make the program create objects the author never intended, which can end in running the attacker's commands. Here the program reads profile files this way, so opening a booby-trapped profile is dangerous.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.