Skip to content
RCE Advisory Advanced CVE-2020-6081

3S-Smart Software Solutions GmbH CODESYS Runtime PLC_Task Code Execution Vulnerability

The CODESYS runtime executes uploaded application code after only a CRC32 integrity check, with no cryptographic signature verification. An attacker able to upload a project (over SSH or the proprietary port 11740, where authentication can be disabled) could send a crafted .app file with matching .crc and achieve remote code execution on the device.

Carl Hurd Follow

Originally disclosed on Cisco Talos

Critical 9.9 View original

An exploitable code execution vulnerability exists in the PLCTask functionality of 3S-Smart Software Solutions GmbH CODESYS Runtime 3.5.14.30. A specially crafted network request can cause remote code execution.

Carl Hurd, 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

Likely the runtime trusts uploaded native machine code after only a CRC32 integrity check, without verifying a cryptographic signature of the binary.

Impact

An attacker could execute arbitrary code on the device with the privileges of the Codesys runtime, even on a device configured to block all direct access other than required application logic.

What the attacker needed

Ability to upload a project; authentication may be disabled on port 11740

How it was found

  1. Build an .app file containing architecture-appropriate shellcode.
  2. Create a .crc file holding the CRC32 of the entire .app file so the check passes.
  3. Upload the project over SSH or the proprietary protocol on port 11740.
  4. The runtime executes the uploaded machine code in a separate thread.

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 programmable logic controller (PLC) is an industrial computer that runs control programs. This runtime accepts new programs from a programming tool and only checks a simple checksum, which anyone can recalculate, rather than a cryptographic signature proving the sender is trusted. So someone who can reach the upload service can make the device run their own code.

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 Carl Hurd

View all

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