Skip to main content

NanoMQ CVE-2026-61633

| EUVDEUVD-2026-83048 LOW
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-09-18 GitHub_M
2.0
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Lure/redirect client to malicious broker
  2. Delivery
    Client connects (MQTT 3.1.1)
  3. Exploit
    Broker sends malformed UNSUBSCRIBE (zero-length topic + trailing data)
  4. Execution
    read_uint16 fails, buf.curpos unchanged, topic_count climbs
  5. Persist
    Infinite loop consumes CPU/memory
  6. Impact
    Auto-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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

nanomq < 0.24.14

Affected Packages

euvd nanomq fix: 0.24.14

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

Vendor (GitHub_M) PRIMARY 2.0 LOW
AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:L
vuln.today AI 3.1 LOW

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).

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L
4.0 AV:N/AC:H/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
High
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

1
Patch available
Sep 18, 2026 - 17:17 EUVD

DescriptionCVE.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

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Low
niche IoT/edge MQTT broker-and-client stack, not broadly deployed enterprise-wide
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Nanomq

View all
CVE-2023-34488 HIGH POC
7.8 Jun 12

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 HIGH POC
7.5 Jul 14

CVE-2024-42646 is a segmentation fault vulnerability in NanoMQ v0.21.10 that allows unauthenticated remote attackers to

CVE-2025-59946 HIGH POC
7.5 Dec 27

A data race in NanoMQ MQTT Broker versions prior to 0.24.2 can free subscription-info list memory while another thread s

CVE-2024-31041 HIGH POC
7.5 Apr 17

Null Pointer Dereference vulnerability in topic_filtern function in mqtt_parser.c in NanoMQ 0.21.7 allows attackers to c

CVE-2023-33657 HIGH POC
7.5 Jun 08

A use-after-free vulnerability exists in NanoMQ 0.17.2. Rated high severity (CVSS 7.5), this vulnerability is remotely e

CVE-2023-33660 HIGH POC
7.5 Jun 08

A heap buffer overflow vulnerability exists in NanoMQ 0.17.2. Rated high severity (CVSS 7.5), this vulnerability is remo

CVE-2023-33658 HIGH POC
7.5 Jun 08

A heap buffer overflow vulnerability exists in NanoMQ 0.17.2. Rated high severity (CVSS 7.5), this vulnerability is remo

CVE-2023-33659 HIGH POC
7.5 Jun 06

A heap buffer overflow vulnerability exists in NanoMQ 0.17.2. Rated high severity (CVSS 7.5), this vulnerability is remo

CVE-2023-29996 HIGH POC
7.5 May 04

In NanoMQ v0.15.0-0, segment fault with Null Pointer Dereference occurs in the process of decoding subinfo_decode and un

CVE-2023-29995 HIGH POC
7.5 May 04

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),

CVE-2023-29994 HIGH POC
7.5 May 04

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

CVE-2024-31036 MEDIUM POC
6.8 Apr 22

A heap-buffer-overflow vulnerability in the read_byte function in NanoMQ v.0.21.7 allows attackers to cause a denial of

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy