CVE-2025-66023 Details
Description
NanoMQ MQTT Broker (NanoMQ) is an all-around Edge Messaging Platform. Versions prior to 0.24.5 have a Heap-Use-After-Free (UAF) vulnerability within the MQTT bridge client component (implemented via the underlying NanoNNG library). The vulnerability is triggered when NanoMQ acts as a bridge connecting to a remote MQTT broker. A malicious remote broker can trigger a crash (Denial of Service) or potential memory corruption by accepting the connection and immediately sending a malformed packet sequence. Version 0.34.5 contains a patch. The patch enforces stricter protocol adherence in the MQTT client SDK embedded in NanoMQ. Specifically, it ensures that CONNACK is always the first packet processed in the line. This prevents the state confusion that led to the Heap-Use-After-Free (UAF) when a malicious server sent a malformed packet sequence immediately after connection establishment. As a workaround, validate the remote broker before bridging.
A Heap-Use-After-Free vulnerability has been identified in the NanoMQ MQTT Broker, specifically in versions prior to 0.24.5. This vulnerability occurs within the MQTT bridge client component, which is implemented using the NanoNNG library. The issue arises when NanoMQ bridges connections to a remote MQTT broker. A malicious broker can exploit this by sending a sequence of malformed packets immediately after establishing a connection, leading to a crash (Denial of Service) or potential memory corruption. The vulnerability is caused by improper handling of the MQTT protocol, allowing exploitation through crafted CONNACK packets.
Users can upgrade to NanoMQ version 0.24.5 or later, where this vulnerability has been patched. The patch enforces stricter adherence to the MQTT protocol by ensuring that the CONNACK packet is always the first one processed, preventing the state confusion that led to the Heap-Use-After-Free vulnerability. As an additional step, validate the remote broker before establishing a bridge connection.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 5, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/nanomq/nanomq/issues/2145 | [email protected] | Issue Tracking |
| https://github.com/nanomq/nanomq/security/advisories/GHSA-24f7-q5hh-27hf | [email protected] | Vendor Advisory |
| https://github.com/nanomq/NanoNNG/pull/1365 | [email protected] | Issue TrackingPatch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-416 | Use After Free | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| emqx nanomq | < 0.24.5 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 18, 2026 | Initial Analysis | [email protected] |
| Jan 1, 2026 | New CVE Received | [email protected] |