CODESYS Development System PackageManagement.plugin ExtensionMethods.Clone() Unsafe Deserialization vulnerability
The CODESYS Development System uses .NET BinaryFormatter to deserialize data when copying a tree node in the Package Designer, which is unsafe for untrusted input. An attacker can provide a malicious file that, when copied, leads to arbitrary command execution.
Originally disclosed on Cisco Talos
An unsafe deserialization vulnerability exists in the PackageManagement.plugin ExtensionMethods.Clone() functionality of CODESYS GmbH CODESYS Development System 3.5.16. 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 uses .NET BinaryFormatter.Deserialize on data that can be influenced by an attacker, without validating or restricting the types being deserialized.
Impact
An attacker could execute arbitrary commands on the victim's machine.
What the attacker needed
Victim opens a malicious file; victim copies a node in Package Designer
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 saves or loads data, it sometimes uses a method that can also run code hidden in the data. Here, the CODESYS development tool uses such an unsafe method when you copy an item in its package designer. If you open a malicious file and copy an item, the hidden code could run on your computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.