NanoMQ
CVE-2025-59947
HIGH
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Buffer copy size validation
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | This is a genuinely high-severity issue carrying a vendor-assigned CVSS 4.0 base score of 8.5 (vector CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P with vulnerable-system impacts VC:L/VI:H/VA:H and subsequent-system SI:H/SA:H), indicating a network-reachable memory-corruption bug with high integrity and availability impact. The attack vector is network (AV:N) and complexity is low (AC:L), but PR:L means the attacker must hold at least low-level (authenticated) MQTT access, and UI:P indicates a passive dependency on a legitimate subscriber being present - both of which temper the raw score. Exploitation status is 'no public exploit identified at time of analysis': no EPSS probability, no CISA KEV listing, and no POC were provided in the intelligence, so there is no evidence of active or at-scale exploitation. The root cause is independently corroborated by the vendor commit diff (an under-sized cvector_grow allocation for msg_infos in pub_handler.c), which raises confidence this is a real, reproducible buffer overflow rather than a theoretical one. Net: treat as a real patch priority for anyone running NanoMQ with shared subscriptions enabled, but it is not a drop-everything internet-wide emergency given the authentication requirement, the specific dual-subscription trigger condition, and the absence of any exploitation signal. Note: EPSS is absent (not low) - scarcity of exploit data reflects a niche product, not confirmed low risk. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
A heap-based buffer overflow in NanoMQ versions prior to 0.24.4 allows an authenticated, remote MQTT client to corrupt memory by publishing a message that triggers both a shared subscription and a vanilla subscription, resulting in high integrity and availability impact. The vendor has addressed the flaw in version 0.24.4; no public exploit code or active exploitation has been identified at time of analysis.
RemediationAI
Upgrade to NanoMQ version 0.24.4 or later, which contains the official fix for this buffer overflow. If an immediate upgrade is not possible, disable shared subscriptions entirely as recommended by the vendor workaround; this prevents the vulnerable code path from being triggered but disables load-balancing features for MQTT subscribers, which may affect scalability in IoT deployments. Additionally, restrict network access to the MQTT broker (e.g., port 1883/8883) and enforce strong authentication and authorization to limit the attack surface to trusted clients only. Refer to the vendor security advisory at https://github.com/nanomq/nanomq/security/advisories/GHSA-98f4-cmg8-x7f3 and the patch commit at https://github.com/nanomq/nanomq/commit/5f5581054bb92f102cf99251e8af2f43763d457b for more information.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is a classic buffer overflow (CWE-120) in the MQTT broker's publish handler (pub_handler.c in the foreach_client function). When a PUBLISH packet matches both a shared subscription and a normal (vanilla) subscription, the code iterates over the matched client contexts and attempts to store message information (msg_infos) for each recipient. The bug lies in an insufficient vector resize: the code called cvector_grow(msg_infos, ctx_list_len) instead of accounting for the existing size of msg_infos, causing a heap overflow when appending additional entries. The fix in commit 5f5581054bb92f102cf99251e8af2f43763d457b corrects the resize to ctx_list_len + cvector_size(msg_infos). NanoMQ is an MQTT broker for IoT edge and software-defined vehicle (SDV) environments, so an attacker with valid MQTT credentials could trigger this remotely over the network, leading to memory corruption with high integrity and availability impact as assessed (CVSS 4.0 base 8.5).
Know when Nanomq gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:H/VA:H/SC:L/SI:H/SA:H
Primary rating from Vendor (github) · only source for this CVE.
CVSS VectorVendor: github
DescriptionCVE.org
NanoMQ is a messaging broker/bus for IoT Edge & SDV. Versions prior to 0.24.4 have a buffer overflow case while the PUBLISH packets trigger both shared subscription and vanila subscription. This is fixed in version 0.24.4. As a workaround, disable shared subscription.
Executive ViewAI
NanoMQ versions prior to 0.24.4 contain a high-severity flaw that could allow a client with valid MQTT access to disrupt broker operations and corrupt message handling, affecting downstream IoT/OT services. Because NanoMQ often supports critical telemetry and control workflows, leadership should treat unpatched brokers as an operational and data-integrity risk, though no public exploit identified at time of analysis and a vendor-released patch, version 0.24.4, is available.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Affected Products (CPE)CVE.org
NanoMQ 0.17.5 has a one-byte heap-based buffer over-read in the conn_handler function of mqtt_parser.c when it processes
CVE-2024-42646 is a segmentation fault vulnerability in NanoMQ v0.21.10 that allows unauthenticated remote attackers to
A data race in NanoMQ MQTT Broker versions prior to 0.24.2 can free subscription-info list memory while another thread s
Null Pointer Dereference vulnerability in topic_filtern function in mqtt_parser.c in NanoMQ 0.21.7 allows attackers to c
A use-after-free vulnerability exists in NanoMQ 0.17.2. Rated high severity (CVSS 7.5), this vulnerability is remotely e
A heap buffer overflow vulnerability exists in NanoMQ 0.17.2. Rated high severity (CVSS 7.5), this vulnerability is remo
A heap buffer overflow vulnerability exists in NanoMQ 0.17.2. Rated high severity (CVSS 7.5), this vulnerability is remo
A heap buffer overflow vulnerability exists in NanoMQ 0.17.2. Rated high severity (CVSS 7.5), this vulnerability is remo
In NanoMQ v0.15.0-0, segment fault with Null Pointer Dereference occurs in the process of decoding subinfo_decode and un
In NanoMQ v0.15.0-0, a Heap overflow occurs in copyn_utf8_str function of mqtt_parser.c. Rated high severity (CVSS 7.5),
In NanoMQ v0.15.0-0, Heap overflow occurs in read_byte function of mqtt_code.c. Rated high severity (CVSS 7.5), this vul
A heap-buffer-overflow vulnerability in the read_byte function in NanoMQ v.0.21.7 allows attackers to cause a denial of
NVD
CVE.org
EPSS
GitHub
Exploit-DB