CODESYS Development System ObjectManager.plugin ProfileInformation.ProfileData Unsafe Deserialization vulnerability
The CODESYS Development System deserialises the ProfileData property of a profile object using .NET BinaryFormatter without validating the input. An attacker who supplies a crafted project file or template containing a malicious profile.auxiliary file could achieve arbitrary command execution when the victim opens it.
Originally disclosed on Cisco Talos
An unsafe deserialization vulnerability exists in the ObjectManager.plugin ProfileInformation.ProfileData 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 ProfileData setter passes untrusted bytes straight to BinaryFormatter.Deserialize, which is unsafe for untrusted input.
Impact
An attacker could achieve arbitrary command execution with the privileges of the user who opens the crafted project file.
What the attacker needed
Victim opens a crafted project file; affected CODESYS version installed
How it was found
- Create or obtain a project file or project template.
- Embed a malicious profile.auxiliary file inside it.
- Open the project in the affected CODESYS Development System version.
- The profile data is deserialised and the attacker's code runs.
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 byte stream and later turning that stream back into objects, a process called deserialisation. If the program trusts whatever bytes it is given, an attacker can craft bytes that make the program build dangerous objects and run their code. Here, opening a project file with a tampered profile section could let an attacker run commands on the victim's machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.