Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLure/redirect client to malicious broker
-
DeliveryClient connects (MQTT 3.1.1)
-
ExploitBroker sends malformed UNSUBSCRIBE (zero-length topic + trailing data)
-
Executionread_uint16 fails, buf.curpos unchanged, topic_count climbs
-
PersistInfinite loop consumes CPU/memory
-
ImpactAuto-reconnect re-triggers, sustained client DoS
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the victim to be a NanoMQ MQTT *client* (version prior to 0.24.14) using MQTT 3.1.1 that connects to an attacker-controlled or compromised broker (or an on-path attacker who can inject the crafted response); the malformed UNSUBSCRIBE packet must contain a zero-length topic followed by trailing data to trigger the loop in nni_mqtt_msg_decode_unsubscribe(). Limiting factors: exploitation targets the client, not the broker (broker-side nmq_unsubinfo_decode is explicitly not affected), so it needs the client to initiate/maintain a connection to a hostile endpoint (UI:R); impact is a self-inflicted DoS of that client, made persistent only when automatic reconnection is enabled. |
| Impact | This is a low-priority DoS with an inverted threat model: the vulnerable component is the NanoMQ MQTT *client*, and the attacker is a malicious/compromised MQTT broker that the client connects to (prior to v0.24.14). The vendor CVSS is 2.0 (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L) - deliberately low, reflecting no confidentiality/integrity impact and only partial availability loss (a hung client connection). No EPSS score, KEV listing, or public exploit was provided; per the source-code evidence only the upstream fix diff (NanoNNG PR #1518, commit fa8d859) exists, which is a patch, not weaponized exploit code. Signals are internally consistent (all point to low real-world urgency), but note a scoring tension I disagree with: the vendor assigns PR:H, yet a malicious broker needs no credentials on the victim client - the real gating factor is inducing the client to connect to an attacker-controlled endpoint (better captured by UI:R and higher AC than by PR:H). Net: a real bug worth patching in edge/IoT client fleets, but not an emergency - impact is self-DoS of an individual connecting client, amplified only where automatic reconnection retries against the malicious broker. |
| Exploit ScenarioDerived | An attacker stands up or compromises an MQTT broker (or performs an on-path redirect) and waits for a NanoMQ 3.1.1 client to connect. The broker returns a malformed UNSUBSCRIBE packet containing a zero-length topic followed by trailing bytes; the client's nni_mqtt_msg_decode_unsubscribe() fails to detect the unadvanced buffer cursor and loops while topic_count keeps climbing, hanging the client and burning CPU/memory - repeated on every automatic reconnect. No public exploit is identified at time of analysis; only the vendor fix commit is available. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 18, 2026
The NanoMQ MQTT client (versions prior to 0.24.14) can be hung and driven into a CPU- and memory-consuming infinite loop by a malicious or compromised MQTT broker that replies to a client UNSUBSCRIBE exchange with a malformed packet containing a zero-length topic followed by trailing data. The defect is CWE-835 in nni_mqtt_msg_decode_unsubscribe() (nng/src/supplemental/mqtt/mqtt_codec.c), where a failed read_uint16() during topic counting leaves buf.curpos unchanged while topic_count keeps incrementing, so the parse loop never terminates; when automatic reconnection is enabled the client re-enters the same state repeatedly, producing a sustained denial of service against the client itself. The independent assessment scores this CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L - a low-impact, low-priority availability issue with an inverted threat model, since the victim is the client and the attacker must supply the hostile endpoint; no public exploit code was identified at time of analysis and the issue is not in CISA KEV. Vendor-released patch: 0.24.14.
RemediationAI
Upgrade to NanoMQ 0.24.14, which is the vendor-released patch for this issue (release tag: https://github.com/nanomq/nanomq/releases/tag/0.24.14); the underlying fix is in NanoNNG PR #1518 (https://github.com/nanomq/NanoNNG/pull/1518, commit fa8d859bb39841e46cfc6cce280d242bd782ad3d) and adds MQTT_ERR_PROTOCOL propagation to nni_mqtt_msg_decode_unsubscribe() and the sibling subscribe decoders. If immediate upgrade is not possible, reduce exposure by not pointing NanoMQ MQTT 3.1.1 clients at untrusted or third-party brokers, by disabling or heavily rate-limiting automatic reconnection so a single malformed packet cannot become a sustained CPU/memory loop (trade-off: reduced resilience to legitimate transient network failures), and by enforcing TLS with strict broker certificate validation to prevent an on-path attacker from injecting the crafted packet (trade-off: added configuration and certificate-management overhead, and no protection if the legitimate broker itself is compromised). Monitor client processes for pinned CPU or unbounded memory growth as a detection signal, and consult the GitHub advisory GHSA-m7mp-rr3v-hmhr for vendor updates.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
NanoMQ bundles the NanoNNG (nng) networking stack, whose MQTT codec in nng/src/supplemental/mqtt/mqtt_codec.c implements packet framing and field extraction for MQTT 3.1.1 and MQTT 5 via helpers such as read_uint16() over a pos_buf cursor (buf->curpos). In nni_mqtt_msg_decode_unsubscribe(), the decoder determines how many topic filters remain by reading a 2-byte length prefix and advancing the cursor; when the read fails, the new code path returns MQTT_ERR_PROTOCOL, but before the fix the failure was not propagated - the cursor stayed put while the topic counter advanced, creating the classic CWE-835 infinite loop. A crafted UNSUBSCRIBE response with a zero-length topic and trailing bytes therefore pins a CPU core and grows memory until reconnect logic restarts the cycle. Notably, the broker-side decoding path (nmq_unsubinfo_decode in src/sp/protocol/mqtt/mqtt_parser.c) is explicitly not affected, and the associated upstream hardening (NanoNNG PR #1518, commit fa8d859) also tightened the broker-side nmq_subtopic_decode/nmq_subinfo_decode/nmq_unsubinfo_decode bounds checks, rejected client-side CONNECT/SUBSCRIBE/UNSUBSCRIBE packet types on the broker transport, and fixed a property-destructor leak in property_parse().
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
AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
Malicious broker needs no privileges on the client (PR:N, disagreeing with vendor PR:H); luring/redirecting the client to a hostile broker raises complexity (AC:H, UI:R); pure availability loss of one client (A:L).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
NanoMQ is an MQTT broker. Prior to 0.24.14, the NanoMQ client function nni_mqtt_msg_decode_unsubscribe() in nng/src/supplemental/mqtt/mqtt_codec.c does not handle a failed read_uint16() while counting topics in a malformed UNSUBSCRIBE packet. A zero-length topic followed by trailing data can leave buf.curpos unchanged while topic_count continues to increase, allowing a malicious MQTT broker to hang a connecting MQTT 3.1.1 client, consume CPU and memory, and repeatedly deny service when automatic reconnection is enabled. The broker-side nmq_unsubinfo_decode path is not affected. This issue is fixed in version 0.24.14.
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
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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
EUVD-2026-83048
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB