1. EXECUTIVE SUMMARY

  • CVSS v3 5.3
  • ATTENTION: Exploitable remotely/low attack complexity
  • Vendor: CODESYS, GmbH
  • Equipment: CODESYS V2 Runtime Toolkit
  • Vulnerability: OS Command Injection

2. RISK EVALUATION

Successful exploitation of this vulnerability may allow the control programmer to call additional OS functions from the PLC logic utilizing the SysFile system library.

3. TECHNICAL DETAILS

3.1 AFFECTED PRODUCTS

CODESYS reports all runtime systems for Linux based on a CODESYS V2 Runtime Toolkit 32-bit full prior Version 2.4.7.55 are affected.

3.2 VULNERABILITY OVERVIEW

3.2.1    OS COMMAND INJECTION CWE-78

The CODESYS Control runtime system enables embedded or PC-based devices to operate as programmable industrial controllers. Control programs can access local or remote input/output (I/O) locations, communication interfaces such as serial ports or sockets, and local system functions such as the file system, real-time clock, and other OS functions. An attacker could exploit this vulnerability to call additional OS functions via the SysFile system library.

CVE-2021-30187 has been assigned to this vulnerability. A CVSS v3 base score of 5.3 has been calculated; the CVSS vector string is (AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).

3.3 BACKGROUND

  • CRITICAL INFRASTRUCTURE SECTORS: Critical Manufacturing
  • COUNTRIES/AREAS DEPLOYED: Worldwide
  • COMPANY HEADQUARTERS LOCATION: Germany

3.4 RESEARCHER

Sergey Fedonin and Ivan Kurnak, of Positive Technologies reported this vulnerability to CODESYS.

4. MITIGATIONS

CODESYS GmbH has released CODESYS Runtime Toolkit 32-bit full Version 2.4.7.55 to solve the noted vulnerability issue for the affected CODESYS products.

Please visit the CODESYS update area for more information on how to obtain software updates.

As part of a security strategy, CODESYS recommends the following general defense measures to reduce the risk of exploits:

  • Use controllers and devices only in a protected environment to minimize network exposure, ensuring they are not accessible from outside.
  • Use firewalls to protect and separate the control system network from other networks.
  • Use VPN (virtual private network) tunnels if remote access is required.
  • Activate and apply user management and password features.
  • Use encrypted communication links.
  • Limit access to both development and control system by physical means, operating system features, etc.
  • Protect both development and control system operations by using up to date virus detecting solutions.

For more information and general recommendations for protecting machines and plants, see also the CODESYS Security Whitepaper.

Please see CODESYS Advisory 2021-08 for more information.

CISA recommends users take defensive measures to minimize the risk of exploitation of this vulnerability. CISA reminds organizations to perform proper impact analysis and risk assessment prior to deploying defensive measures.

CISA also provides a section for control systems security recommended practices on the ICS webpage on us-cert.cisa.gov. Several recommended practices are available for reading and download, including Improving Industrial Control Systems Cybersecurity with Defense-in-Depth Strategies.

Additional mitigation guidance and recommended practices are publicly available on the ICS webpage on us-cert.cisa.gov in the Technical Information Paper, ICS-TIP-12-146-01B–Targeted Cyber Intrusion Detection and Mitigation Strategies.

Organizations observing any suspected malicious activity should follow their established internal procedures and report their findings to CISA for tracking and correlation against other incidents.

No known public exploits specifically target this vulnerability.

Source:

https://us-cert.cisa.gov/ics/advisories/icsa-21-173-04