Skip to main content

NanoMQ CVE-2025-59946

HIGH
Use After Free (CWE-416)
2025-12-27 security-advisories@github.com
7.5
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Connect to MQTT broker as client
  2. Delivery
    Issue concurrent subscribe/unsubscribe operations
  3. Exploit
    Race the shared sub-info list
  4. Execution
    Trigger heap use-after-free
  5. Impact
    Crash 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.4% exploitation probability (EPSS)

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

Alert me

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

Vendor (github) PRIMARY 7.5 HIGH
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 5.3 MEDIUM

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.

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

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

Why It Matters

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.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Low
niche lightweight edge/IoT MQTT broker, limited broad enterprise footprint
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

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 HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Medium

Priority Score

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

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

cpe:2.3:a:emqx:nanomq:*:*:*:*:*:*:*:*

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

CVE-2024-42649 MEDIUM POC
6.5 Jul 14

NanoMQ v0.22.10 was discovered to contain a memory leak which allows attackers to cause a Denial of Service (DoS) via a

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