NanoMQ
CVE-2025-59946
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessConnect to MQTT broker as client
-
DeliveryIssue concurrent subscribe/unsubscribe operations
-
ExploitRace the shared sub-info list
-
ExecutionTrigger heap use-after-free
-
ImpactCrash broker and deny messaging service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires network reachability to the NanoMQ broker's MQTT listener and the ability to perform subscription operations (subscribe/unsubscribe), so an active MQTT client session is needed - per CVSS PR:L this is treated as authenticated, though NanoMQ deployments that permit anonymous connections would remove that barrier. The core limiting factor is the data-race nature (CVSS AC:H): the attacker must win a concurrent timing window on the sub-info list, making the trigger nondeterministic and reducing reliability. Affected deployments are NanoMQ versions prior to 0.24.2; upgrading to 0.24.2 removes the condition entirely. |
| Impact | Signals are moderate and partly conflicting. The published CVSS 3.1 vector (AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H, base 7.5) claims full confidentiality, integrity AND availability impact, but the description, the CWE-416 classification, and the vendor tags ('Denial Of Service', 'Use After Free', 'Memory Corruption') all describe a heap use-after-free that produces a crash - i.e. an availability loss, not confirmed data disclosure or code execution. This C:H/I:H appears to be a conservative over-rating of UAF's theoretical RCE potential; treat the realistic impact as a remotely triggerable broker crash unless the vendor confirms exploitable memory corruption. AC:H is significant: the flaw is a classic data race on the subscription-info list, so exploitation depends on winning a timing window rather than a deterministic trigger, which lowers reliability. Publicly available exploit/reproduction material exists (the GitHub issue), but the CVE is NOT in CISA KEV and no EPSS score was supplied, so there is no evidence of active or widespread exploitation - this reads as a real but non-urgent availability bug, not a drop-everything priority. PR:L per the vector implies an authenticated/connected MQTT client is required; note that many MQTT brokers permit anonymous connections by default, which could effectively lower that barrier, but authentication requirements should be verified against the deployment's config. |
| Exploit ScenarioDerived | An attacker who can open MQTT connections to a NanoMQ broker (version < 0.24.2) repeatedly subscribes and unsubscribes from topics across concurrent sessions to race accesses to the shared subscription-info list. Winning the race frees a structure still referenced elsewhere, dereferencing dangling memory and crashing the broker, cutting off messaging for all connected edge/IoT clients. Public reproduction material is referenced in the vendor's GitHub issue #1863, though the race condition (AC:H) makes reliable triggering nondeterministic. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
A data race in NanoMQ MQTT Broker versions prior to 0.24.2 can free subscription-info list memory while another thread still references it, producing a heap use-after-free that crashes the broker and denies MQTT service to connected clients. The flaw is reachable by remote attackers who hold an MQTT session able to perform subscribe/unsubscribe operations (CVSS PR:L, treated as authenticated, though deployments allowing anonymous connections remove that barrier), and exploitation is nondeterministic because the attacker must win a concurrent timing window (CVSS AC:H). Publicly available exploit code exists, and no confirmed active exploitation (CISA KEV) has been reported; independent assessment rates availability-only impact (C:N/I:N/A:H), while NVD's original vector claimed high confidentiality and integrity impact, so the confidentiality/integrity exposure should be treated as unproven. Upgrading to 0.24.2 eliminates the condition.
RemediationAI
Apply the vendor-released patch by upgrading NanoMQ to version 0.24.2 or later, the only complete fix for the subscription-list data race and resulting heap use-after-free; see advisory GHSA-xg37-23w7-72p5 and issue #1863 for the fix reference. If immediate upgrade is not possible, restrict network access to the MQTT listener (firewall/ACL to trusted client IPs) and disable anonymous access by enforcing per-client authentication and unique credentials, understanding that this reduces attacker reach but does not eliminate the race if any client can subscribe; additionally consider rate-limiting or throttling SUBSCRIBE/UNSUBSCRIBE churn and reducing concurrent subscription activity on a session, accepting that this is probabilistic mitigation because the trigger is a timing window rather than a deterministic packet. Deploy the broker with supervision/auto-restart (systemd restart policy, container restart, or process watchdog) so that a crash results in brief message loss rather than a sustained outage, and monitor for abnormal broker terminations or core dumps as an indicator of attempts. Harden edge deployments that expose MQTT to the internet with TLS plus client certificates or a broker-level authorization layer to limit who can open subscription sessions at all.
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
NanoMQ is an EMQX/emqx-maintained edge MQTT broker (CPE cpe:2.3:a:emqx:nanomq:*:*:*:*:*:*:*:* covers all versions before the fix), built on an asynchronous, multi-threaded networking core where MQTT SUBSCRIBE and UNSUBSCRIBE packets mutate a shared subscription-info list. CWE-416 (use after free) arises here from an unsynchronized concurrent access pattern on that list - effectively a data race - where one thread frees a subscription entry while another thread still holds and dereferences a pointer to it, corrupting heap memory and terminating the broker process. This is a memory-safety defect in the broker's session/subscription bookkeeping rather than a protocol-parsing flaw, which is why the independent assessment limits impact to availability and rates exploitability as high-complexity and timing-dependent. The publicly posted issue at github.com/nanomq/nanomq/issues/1863 illustrates the trigger, and the vendor advisory GHSA-xg37-23w7-72p5 documents the 0.24.2 fix.
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:L/UI:N/S:U/C:H/I:H/A:H
Remotely reachable but requires a connected MQTT client (PR:L) and winning a race (AC:H); the described outcome is a crash, so A:H only with C/I set to N.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
NanoMQ MQTT Broker (NanoMQ) is an Edge Messaging Platform. Prior to version 0.24.2, there is a classical data racing issue about sub info list which could result in heap use after free crash. This issue has been patched in version 0.24.2.
Executive ViewAI
NanoMQ MQTT Broker deployments running versions earlier than 0.24.2 are exposed to a memory-safety flaw that can crash the broker and cut off MQTT service for every connected client and dependent application. The vulnerability requires an established MQTT session and a difficult-to-win race condition, but publicly available exploit code exists and no vendor patch data beyond release 0.24.2 has been confirmed, so any internet-facing or anonymously accessible broker should be treated as at risk of service disruption. Leadership should care because a broker outage cascades directly into IoT, telemetry, and messaging pipelines that depend on it.
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
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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
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
NanoMQ v0.22.10 was discovered to contain a memory leak which allows attackers to cause a Denial of Service (DoS) via a
NVD
CVE.org
EPSS
GitHub
Exploit-DB