CVE-2024-42651

7.5

NanoMQ · NanoMQ

NanoMQ 0.17.9 contains a heap use-after-free vulnerability in the sub_Ctx_handle component, allowing unauthenticated attackers to cause a denial of service via a crafted SUBSCRIBE message.

Executive summary

A heap use-after-free vulnerability in NanoMQ 0.17.9 poses a significant risk of service disruption through denial of service attacks.

Vulnerability

This is a memory corruption vulnerability classified as a heap use-after-free within the sub_Ctx_handle function. It is reachable by unauthenticated remote attackers who can send a malicious MQTT SUBSCRIBE packet to the broker.

Business impact

The vulnerability carries a CVSS score of 7.5, indicating a high severity due to the ease of exploitation over the network. Successful exploitation results in a crash of the MQTT broker, leading to system downtime and loss of connectivity for all connected IoT devices or services relying on the messaging infrastructure.

Remediation

Immediate Action: Review the official NanoMQ repository for security patches or version updates that address issue 1217. If no patch is available, restrict network access to the MQTT broker to trusted sources only.

Proactive Monitoring: Monitor system logs for repeated broker crashes or abnormal memory usage patterns in the NanoMQ process.

Compensating Controls: Implement network-level filtering to block malformed MQTT packets or unauthorized SUBSCRIBE requests if the broker is exposed to untrusted networks.

Exploitation status

Public Exploit Available: Yes — a public proof of concept is available via the researcher's GitHub repository referenced in the CVE record.

Analyst recommendation

Given the high CVSS score and the existence of a published proof of concept, this vulnerability poses a clear risk to operational availability. Security teams must verify their current NanoMQ version and apply vendor-supplied updates as soon as they are released. If an immediate update is not feasible, isolation of the MQTT broker from public-facing networks is recommended to prevent remote exploitation.

More NanoMQ CVEs

Sources