CODESYS V2 Denial of Service

Title

CODESYS V2 Denial of Service

Product

CODESYS Runtime Toolkit 32-bit, CODESYS PLCWinNT

Vulnerable Version

<V2.4.7.56

Fixed Version

V2.4.7.56

CVE Number

CVE-2021-34593

Impact

high

Found

05.05.2021

By

Gerhard Hechenberger, Steffen Robertz (Office Vienna) | SEC Consult Vulnerability Lab

These vulnerabilities were discovered during the research cooperation initiative "OT Cyber Security Lab" between Verbund AG and SEC Consult Group.

 

The CODESYS runtime versions before V2.4.7.56 are vulnerable for a denial of service (DoS) condition of the CODESYS development system connection. By exploiting this vulnerability, an attacker can prevent the remote administration of affected PLCs.

Vendor description

"CODESYS is the leading manufacturer-independent IEC 61131-3 automation
software for engineering control systems."

Source: www.codesys.com


Business recommendation

The vendor provides patches. The vendors of products using the affected
software should provide new firmware versions immediately. Users of these
products should update their devices to those fixed firmware versions.


Vulnerability overview/description


The CODESYS Control runtime system is the core of many PLCs. The runtime is 
accepting TCP connections on a pre-configured port to connect to the 
development system. By sending requests that define an invalid packet size,
a memory allocation error can be triggered. This leads to a denial of service
condition of the remote connectivity of the CODESYS service, which prevents
clients from connecting to the affected PLC.

CODESYS released a dedicated security note, which corresponds to this advisory:
customers.codesys.com/index.php


Proof of concept


A detailed proof of concept will be made public after the affected product
vendors had time to provide new firmware versions.


Vulnerable / tested versions

2.4.7.0


Vendor contact timeline

2021-05-25 Contacting 3rd party vendor of a product using the CODESYS runtime about this issue.
2021-08-11 Vendor states that this issue was already fixed in a recent CODESYS release.
2021-09-01 The vendor confirms and ensures the issue is investigated in collaboration with CODESYS.
2021-08-18 A check on the product's most recent public firmware release shows that the vulnerability still exists. The vendor is notified again about this outcome.
2021-10-15 CODESYS informs about the assigned CVE-2021-34593 and the planned publishing date.
2021-10-28 Coordinated release.

Solution

Immediately update to the patched version of CODESYS.


Workaround

To mitigate this issue, access to the CODESYS service port of the affected
devices should be limited as far as possible. In the long run, the updated
firmware of the product vendor containing a patched CODESYS service must be
installed.


Advisory URL

sec-consult.com/vulnerability-lab/
 

SEC Consult Vulnerability Lab

SEC Consult, an Atos company
Europe | Asia | North America

About SEC Consult Vulnerability Lab
The SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an
Atos company. It ensures the continued knowledge gain of SEC Consult in the
field of network and application security to stay ahead of the attacker. The
SEC Consult Vulnerability Lab supports high-quality penetration testing and
the evaluation of new offensive and defensive technologies for our customers.
Hence our customers obtain the most current information about vulnerabilities
and valid recommendation about the risk profile of new technologies.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Interested to work with the experts of SEC Consult?
Send us your application sec-consult.com/career/

Interested in improving your cyber security with the experts of SEC Consult?
Contact our local offices sec-consult.com/contact/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mail: research at sec-consult dot com
Web: www.sec-consult.com
Blog: blog.sec-consult.com
Twitter: twitter.com/sec_consult

EOF Gerhard Hechenberger, Steffen Robertz / @2021