CVE-2025-66023
NanoMQ has Use-After-Free of malformed bridging message
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.
INFO
Published Date :
Jan. 1, 2026, 3:15 p.m.
Last Modified :
Feb. 18, 2026, 4:34 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | MEDIUM | [email protected] | ||||
| CVSS 4.0 | MEDIUM | [email protected] |
Solution
- Update NanoMQ to version 0.34.5 or later.
- Validate the remote MQTT broker before establishing a bridge connection.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-66023.
| URL | Resource |
|---|---|
| https://github.com/nanomq/NanoNNG/pull/1365 | Issue Tracking Patch |
| https://github.com/nanomq/nanomq/issues/2145 | Issue Tracking |
| https://github.com/nanomq/nanomq/security/advisories/GHSA-24f7-q5hh-27hf | Vendor Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-66023 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-66023
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-66023 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-66023 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Feb. 18, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H Added CPE Configuration OR *cpe:2.3:a:emqx:nanomq:*:*:*:*:*:*:*:* versions up to (excluding) 0.24.5 Added Reference Type GitHub, Inc.: https://github.com/nanomq/nanomq/issues/2145 Types: Issue Tracking Added Reference Type GitHub, Inc.: https://github.com/nanomq/nanomq/security/advisories/GHSA-24f7-q5hh-27hf Types: Vendor Advisory Added Reference Type GitHub, Inc.: https://github.com/nanomq/NanoNNG/pull/1365 Types: Issue Tracking, Patch -
New CVE Received by [email protected]
Jan. 01, 2026
Action Type Old Value New Value Added 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. Added CVSS V4.0 AV:N/AC:H/AT:P/PR:H/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X Added CWE CWE-416 Added Reference https://github.com/nanomq/nanomq/issues/2145 Added Reference https://github.com/nanomq/nanomq/security/advisories/GHSA-24f7-q5hh-27hf Added Reference https://github.com/nanomq/NanoNNG/pull/1365