CVE-2023-3662

7.3 HIGH

📋 TL;DR

This vulnerability in CODESYS Development System allows attackers to execute arbitrary binaries from the current working directory with the user's privileges. It affects users running vulnerable versions of CODESYS Development System, potentially leading to unauthorized code execution.

💻 Affected Systems

Products:
  • CODESYS Development System
Versions: 3.5.17.0 to versions prior to 3.5.19.20
Operating Systems: Windows, Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Affects both Windows and Linux installations of CODESYS Development System within the specified version range.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise through remote code execution leading to data theft, ransomware deployment, or lateral movement within the network.

🟠

Likely Case

Local privilege escalation or execution of malicious payloads when users open malicious projects or files.

🟢

If Mitigated

Limited impact if proper file permissions and user account controls restrict binary execution.

🌐 Internet-Facing: MEDIUM - Requires user interaction but could be exploited through web interfaces or file uploads.
🏢 Internal Only: HIGH - Internal users with access to vulnerable systems could exploit this for privilege escalation.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires user interaction such as opening a malicious project file or navigating to a compromised directory.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.5.19.20

Vendor Advisory: https://cert.vde.com/en/advisories/VDE-2023-021/

Restart Required: Yes

Instructions:

1. Download CODESYS Development System version 3.5.19.20 or later from the official CODESYS website. 2. Run the installer and follow the upgrade process. 3. Restart the system after installation completes.

🔧 Temporary Workarounds

Restrict directory permissions

all

Limit write and execute permissions on directories where CODESYS projects are stored to prevent unauthorized binary placement.

chmod 755 /path/to/codesys/projects (Linux)
icacls "C:\path\to\codesys\projects" /deny Everyone:(OI)(CI)(W) (Windows)

Use least privilege accounts

all

Run CODESYS Development System with non-administrative user accounts to limit potential damage from exploitation.

🧯 If You Can't Patch

  • Monitor for suspicious binary execution from CODESYS working directories using endpoint detection tools.
  • Implement application allowlisting to prevent execution of unauthorized binaries from CODESYS directories.

🔍 How to Verify

Check if Vulnerable:

Check CODESYS Development System version in Help > About menu. If version is between 3.5.17.0 and 3.5.19.20 (exclusive), the system is vulnerable.

Check Version:

codesys --version (Linux) or check Help > About in GUI (Windows)

Verify Fix Applied:

Verify version is 3.5.19.20 or higher in Help > About menu.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected binary execution from CODESYS working directories
  • Process creation events from CODESYS.exe with unusual parent processes

Network Indicators:

  • Outbound connections from CODESYS process to unexpected destinations

SIEM Query:

ProcessName="codesys.exe" AND (CommandLine="*.exe" OR ParentProcess!="explorer.exe")

🔗 References

📤 Share & Export