Skip to main content

NanoMQ CVE-2025-59947

HIGH
Classic Buffer Overflow (CWE-120)
2025-12-15 security-advisories@github.com
8.5
CVSS 4.0 · Vendor: github
View

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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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 – 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

Vendor (github) PRIMARY 8.5 HIGH
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
High
Subsequent system: Availability
High

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 76% exploitable
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 No
EPSS 0.3%
Patch available Yes
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
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

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

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

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