CVE-2021-34595

8.1 HIGH

📋 TL;DR

CVE-2021-34595 is an out-of-bounds read/write vulnerability in CODESYS V2 Runtime Toolkit and PLCWinNT software. Attackers can send crafted requests with invalid offsets to cause denial-of-service or local memory corruption. This affects industrial control systems using vulnerable versions of these CODESYS products.

💻 Affected Systems

Products:
  • CODESYS V2 Runtime Toolkit 32 Bit full
  • PLCWinNT
Versions: All versions prior to V2.4.7.56
Operating Systems: Windows (PLCWinNT), 32-bit systems (Runtime Toolkit)
Default Config Vulnerable: ⚠️ Yes
Notes: Affects industrial control systems using CODESYS V2 technology stack. The vulnerability exists in the runtime components.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local memory overwrite could lead to arbitrary code execution, potentially compromising the PLC controller and allowing attackers to manipulate industrial processes.

🟠

Likely Case

Denial-of-service conditions disrupting PLC operations, causing industrial process interruptions or downtime.

🟢

If Mitigated

Limited impact if systems are isolated from untrusted networks and proper access controls are implemented.

🌐 Internet-Facing: HIGH if exposed to untrusted networks, as the vulnerability can be triggered remotely.
🏢 Internal Only: MEDIUM to HIGH depending on network segmentation and internal threat landscape.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting specific requests with invalid offsets. No public exploit code was found at time of analysis.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: V2.4.7.56 or later

Vendor Advisory: https://customers.codesys.com/index.php?eID=dumpFile&t=f&f=16878&token=e5644ec405590e66aefa62304cb8632df9fc9e9c&download=

Restart Required: Yes

Instructions:

1. Download patch from CODESYS customer portal. 2. Backup current configuration. 3. Install update following vendor instructions. 4. Restart affected systems. 5. Verify version update.

🔧 Temporary Workarounds

Network Segmentation

all

Isolate CODESYS systems from untrusted networks using firewalls and VLANs.

Access Control Restrictions

all

Implement strict network access controls to limit who can communicate with CODESYS services.

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate vulnerable systems
  • Deploy intrusion detection systems to monitor for exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check CODESYS software version against affected versions list. Review system logs for abnormal requests or crashes.

Check Version:

Check CODESYS Control application or runtime properties for version information

Verify Fix Applied:

Verify installed version is V2.4.7.56 or later using CODESYS version check utilities.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected process crashes
  • Memory access violation errors
  • Abnormal network requests to CODESYS services

Network Indicators:

  • Unusual traffic patterns to CODESYS ports (typically 1217, 2455)

SIEM Query:

source="CODESYS" AND (event_type="crash" OR error="memory" OR error="access")

🔗 References

📤 Share & Export