CVE-2018-5440

9.8 CRITICAL

📋 TL;DR

A stack-based buffer overflow vulnerability in CODESYS Web Server allows remote attackers to execute arbitrary code or cause denial-of-service by sending crafted requests. Affects CODESYS web servers running stand-alone Version 2.3 or as part of CODESYS runtime systems prior to V1.1.9.19 on Windows and Windows CE platforms.

💻 Affected Systems

Products:
  • 3S-Smart CODESYS Web Server
  • CODESYS runtime system with web server component
Versions: Stand-alone Version 2.3, Runtime systems prior to V1.1.9.19
Operating Systems: Microsoft Windows, Windows CE
Default Config Vulnerable: ⚠️ Yes
Notes: Affects both stand-alone web servers and web servers integrated into CODESYS runtime systems. All default configurations are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with SYSTEM/administrator privileges leading to complete system compromise, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Denial-of-service causing web server crashes and disruption of industrial control operations, with potential for limited code execution.

🟢

If Mitigated

Isolated denial-of-service with no code execution due to network segmentation and exploit mitigations.

🌐 Internet-Facing: HIGH - Web servers exposed to internet are directly vulnerable to remote exploitation without authentication.
🏢 Internal Only: HIGH - Even internally, any network-accessible CODESYS web server can be exploited by attackers who gain internal access.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending crafted HTTP requests to the web server. No authentication is required, making this easily exploitable.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: V1.1.9.19 or later for runtime systems, updated stand-alone version

Vendor Advisory: https://ics-cert.us-cert.gov/advisories/ICSA-18-032-02

Restart Required: Yes

Instructions:

1. Download updated CODESYS runtime system V1.1.9.19 or later from 3S-Smart. 2. Stop the CODESYS web server service. 3. Install the update. 4. Restart the service. 5. Verify the version is updated.

🔧 Temporary Workarounds

Network Segmentation

all

Isolate CODESYS web servers from untrusted networks using firewalls or network segmentation.

Disable Web Server

windows

Disable the CODESYS web server if not required for operations.

sc stop "CODESYS Web Server"
sc config "CODESYS Web Server" start= disabled

🧯 If You Can't Patch

  • Implement strict network access controls to limit access to CODESYS web servers only from trusted IP addresses.
  • Deploy intrusion detection/prevention systems to monitor for buffer overflow exploitation attempts against the web server.

🔍 How to Verify

Check if Vulnerable:

Check CODESYS runtime system version: if prior to V1.1.9.19 or using stand-alone web server Version 2.3, the system is vulnerable.

Check Version:

Check CODESYS control panel or runtime configuration for version information.

Verify Fix Applied:

Verify CODESYS runtime system version is V1.1.9.19 or later, and web server is no longer Version 2.3.

📡 Detection & Monitoring

Log Indicators:

  • Web server crash logs
  • Unusual HTTP requests with long parameters or malformed headers
  • Access attempts from unexpected IP addresses

Network Indicators:

  • HTTP requests with unusually long content-length or parameters
  • Multiple connection attempts to CODESYS web server port (default 80/8080)
  • Traffic patterns indicating buffer overflow exploitation

SIEM Query:

source="CODESYS" AND (event="crash" OR http_request_length>10000)

🔗 References

📤 Share & Export