CVE-2022-47383

8.8 HIGH

📋 TL;DR

An authenticated remote attacker can exploit a stack-based out-of-bounds write vulnerability in the CmpTraceMgr component of CODESYS products to cause denial-of-service, memory corruption, or potentially execute arbitrary code. This affects multiple CODESYS products across various versions. Organizations using CODESYS industrial automation software are at risk.

💻 Affected Systems

Products:
  • CODESYS Control runtime systems
  • CODESYS Development System
  • CODESYS Gateway
  • CODESYS HMI
  • CODESYS Safety
  • CODESYS SoftMotion
  • CODESYS OPC UA Server
Versions: Multiple versions prior to specific patched versions (check vendor advisory for exact ranges)
Operating Systems: Windows, Linux, VxWorks, QNX, Other real-time operating systems supported by CODESYS
Default Config Vulnerable: ⚠️ Yes
Notes: Affects CODESYS V3 products with CmpTraceMgr component enabled. Requires authenticated access to exploit.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, allowing attacker to take control of industrial control systems.

🟠

Likely Case

Denial-of-service conditions disrupting industrial operations, with potential for memory corruption affecting system stability.

🟢

If Mitigated

Limited impact if proper network segmentation and authentication controls prevent attacker access to vulnerable systems.

🌐 Internet-Facing: HIGH if CODESYS systems are exposed to internet without proper controls, as authenticated access is sufficient for exploitation.
🏢 Internal Only: HIGH due to authenticated attacker requirement, making internal threats and compromised credentials significant risks.

🎯 Exploit Status

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

Requires authenticated access and knowledge of CODESYS systems. Stack-based buffer overflow exploitation requires specific conditions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Varies by product - refer to CODESYS Security Advisory 2022-12

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

Restart Required: Yes

Instructions:

1. Download appropriate patch from CODESYS customer portal. 2. Apply patch according to CODESYS documentation. 3. Restart affected systems. 4. Verify patch installation.

🔧 Temporary Workarounds

Disable CmpTraceMgr component

all

Disable the vulnerable CmpTraceMgr component if not required for operations

Refer to CODESYS documentation for component disabling procedures

Network segmentation

all

Isolate CODESYS systems from untrusted networks and implement strict access controls

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate CODESYS systems from untrusted networks
  • Enforce strong authentication mechanisms and monitor for unauthorized access attempts
  • Disable unnecessary CODESYS services and components, particularly CmpTraceMgr if not required

🔍 How to Verify

Check if Vulnerable:

Check CODESYS version against affected versions in vendor advisory. Verify if CmpTraceMgr component is enabled.

Check Version:

Use CODESYS development environment or runtime tools to check version information

Verify Fix Applied:

Verify installed version matches or exceeds patched version specified in CODESYS advisory. Confirm CmpTraceMgr component is either patched or disabled.

📡 Detection & Monitoring

Log Indicators:

  • Unusual authentication attempts to CODESYS systems
  • CmpTraceMgr component errors or crashes
  • Memory access violations in system logs

Network Indicators:

  • Unexpected connections to CODESYS ports (typically 1217, 2455, 11740)
  • Traffic patterns indicating exploitation attempts

SIEM Query:

source="codesys" AND (event_type="authentication_failure" OR event_type="component_crash" OR message="*CmpTraceMgr*")

🔗 References

📤 Share & Export