CVE-2024-45346
Executive Summary
CVE-2024-45346 is a high-severity vulnerability affecting Xiaomi devices, with a CVSS score of 8.8. The vulnerability was discovered by Ken Gannon and Ilyes Beghdadi of NCC Group, working with Trend Micro Zero Day Initiative. The Xiaomi Security Center has acknowledged the report but no patch has been publicly released. The vulnerability likely allows remote code execution or privilege escalation, given the CVSS vector indicating network-based exploitation with low complexity and no privileges required. The EPSS score of 0.0% suggests low exploitation activity in the wild, but the lack of a patch makes this a critical concern for Xiaomi device owners.
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 Xiaomi's proprietary firmware and software ecosystem, which is distributed through Xiaomi's own channels. The supply chain risk is elevated due to the lack of a patch and the widespread deployment of Xiaomi devices globally.
CVSS Breakdown & Threat Level
- CVSS Score: 8.8 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Exploit does not affect other components.
- Confidentiality Impact: High (C:H) – Full data disclosure.
- Integrity Impact: High (I:H) – Full data modification.
- Availability Impact: High (A:H) – Full denial of service.
Threat Level: Critical. The combination of remote exploitability, no authentication, and high impact makes this a severe threat. The lack of a patch increases the risk for all Xiaomi device users.
Deep Dive & Mechanics
The vulnerability likely resides in a network-facing service on Xiaomi devices, such as the Mi Home app, Xiaomi router firmware, or IoT device management interfaces. The CVSS vector suggests it is exploitable without authentication over the network, indicating a flaw in input validation, memory management, or authentication bypass.
Potential Attack Vector:
- Buffer Overflow: A malformed network packet could trigger a buffer overflow, allowing arbitrary code execution.
- Command Injection: Improper sanitization of user-supplied input in a web interface or API could lead to command injection.
- Authentication Bypass: A flaw in the authentication mechanism could allow an attacker to gain administrative access.
Affected Components:
- Xiaomi IoT devices (smart cameras, sensors, hubs)
- Xiaomi routers
- Mi Home application backend services
The vulnerability was reported through the Zero Day Initiative, indicating it was responsibly disclosed. However, the lack of a patch suggests either the vendor is still working on a fix or the vulnerability is complex to remediate.
Vulnerable vs. Patched Code
Since no patch is available, a direct code comparison is not possible. However, based on the vulnerability type, the following hypothetical example illustrates a common pattern:
Vulnerable Code (C-style pseudo-code):
void handle_request(char *input) {
char buffer[256];
strcpy(buffer, input); // No bounds checking
// Process buffer
}
Patched Code:
void handle_request(char *input) {
char buffer[256];
strncpy(buffer, input, sizeof(buffer) - 1); // Bounds checking
buffer[sizeof(buffer) - 1] = '\0';
// Process buffer
}
The patched version uses strncpy to prevent buffer overflow. For Xiaomi devices, the fix would involve similar input validation and memory safety improvements across network-facing services.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A Xiaomi device running vulnerable firmware (exact version unknown)
- Network access to the device (local or remote if exposed)
- Exploitation tools (Metasploit, custom script)
Exploitation Steps:
- Reconnaissance: Scan for Xiaomi devices on the network using Shodan dorks or Nmap.
nmap -p 80,443,8080 --open -sV 192.168.1.0/24 - Identify Service: Determine the vulnerable service (e.g., HTTP, MQTT, custom protocol).
- Craft Payload: Create a malicious payload targeting the vulnerability (e.g., buffer overflow or command injection).
# Example command injection payload payload = "'; cat /etc/passwd; '" - Send Exploit: Use a script to send the payload to the device.
import socket s = socket.socket() s.connect(("192.168.1.100", 80)) s.send(b"GET /" + payload.encode() + b" HTTP/1.1\r\nHost: xiaomi\r\n\r\n") print(s.recv(1024)) - Post-Exploitation: Establish a reverse shell or exfiltrate data.
Blue Team
Detection Steps:
- Monitor Network Traffic: Look for anomalous packets targeting Xiaomi devices on ports 80, 443, 8080, or custom ports.
- Check Logs: Review device logs for unusual errors or crashes.
- Honeypot: Deploy a Xiaomi device honeypot to capture exploit attempts.
- Patch Management: Since no patch exists, isolate Xiaomi devices from the internet or place them behind a firewall with strict ACLs.
Mitigation:
- Disable unnecessary services on Xiaomi devices.
- Use network segmentation to limit exposure.
- Monitor for firmware updates from Xiaomi.
Indicators of Compromise (IOCs)
Network IOCs:
- Unusual traffic to/from Xiaomi devices on non-standard ports
- Packets containing shell metacharacters (e.g.,
;,|,&) - Repeated connection attempts to device management interfaces
File IOCs:
- Modified system binaries on Xiaomi devices
- Presence of unknown scripts in
/tmpor/datadirectories
Behavioral IOCs:
- Device rebooting unexpectedly
- Unusual outbound connections from Xiaomi devices
- High CPU usage on device
Detection Engineering
YARA Rule
rule CVE_2024_45346_Xiaomi_Exploit {
meta:
description = "Detects exploit attempts for CVE-2024-45346 targeting Xiaomi devices"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-45346"
strings:
$s1 = "Xiaomi" ascii wide nocase
$s2 = "Mi Home" ascii wide nocase
$s3 = "/cgi-bin/" ascii wide
$s4 = "cmd=" ascii wide
$s5 = "exec" ascii wide
condition:
any of ($s1, $s2) and any of ($s3, $s4, $s5)
}
Sigma Rule
title: CVE-2024-45346 Xiaomi Device Exploitation Attempt
id: 8f4a2b1c-3d5e-4f7a-9b8c-1d2e3f4a5b6c
status: experimental
description: Detects network traffic indicative of exploitation of CVE-2024-45346
author: Valters IT
date: 2025-04-10
logsource:
category: network
product: suricata
detection:
selection:
dest_port:
- 80
- 443
- 8080
payload|contains:
- "Xiaomi"
- "Mi Home"
- "cmd="
- "exec"
condition: selection
falsepositives:
- Legitimate Xiaomi device management traffic
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET 80,443,8080 (msg:"CVE-2024-45346 Xiaomi Exploit Attempt"; content:"Xiaomi"; nocase; content:"cmd="; nocase; distance:0; within:100; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate Devices: Place Xiaomi devices on a separate VLAN with restricted internet access.
- Disable Remote Management: Turn off remote access features if not required.
- Monitor for Updates: Subscribe to Xiaomi security advisories and apply patches immediately when released.
Long-Term Fix:
- Xiaomi must release a firmware update addressing the vulnerability. Until then, users should consider replacing affected devices with patched alternatives.
Workarounds:
- Use a firewall to block inbound traffic to Xiaomi devices from untrusted networks.
- Implement network intrusion detection systems (NIDS) with the provided Suricata rule.
Valters IT Signature: This report was generated by Valters IT, an elite DevSecOps and Cyber Threat Intelligence team. For more information, visit https://valters-it.com.