Skip to main content

NanoMQ CVE-2026-35217

| EUVDEUVD-2026-46021 MEDIUM
Out-of-bounds Read (CWE-125)
2026-07-20 GitHub_M
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Establish TCP connection to MQTT listener
  2. Delivery
    Send MQTT v5 CONNECT packet
  3. Exploit
    Craft SUBSCRIBE packet omitting Subscription Options byte with precise packet-length alignment
  4. Execution
    Parser reads 1 byte past heap allocation boundary
  5. Impact
    Broker process crashes (DoS) or installs malformed subscription into subinfol state (integrity)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the attacker can establish a TCP connection to the NanoMQ MQTT broker listener and send a valid MQTT v5 CONNECT followed by a crafted MQTT v5 SUBSCRIBE packet. No authentication credentials are required (PR:N per CVSS). For the semantic-only impact (unauthorized subscription installation), the only condition is that the SUBSCRIBE packet omits the Subscription Options byte for one or more topic filters - this is achievable with any MQTT v5 client capable of sending raw packet bytes. For the availability impact (heap-buffer-overflow crash), the additional condition is that the total packet framing be constructed so that the missing Subscription Options byte position aligns with the real heap allocation boundary of the message buffer - this specific packet-length construction is the AC:H factor and limits reliable crash triggering to deliberate crafting. Exploitation is bounded by: network access to the MQTT port (non-default exposure if broker is behind a firewall), the AC:H requirement for the crash path, and the absence of any MQTT-level feature gating since SUBSCRIBE handling is always active.

Impact

The CVSS 3.1 score of 6.5 (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H) accurately reflects the two-tiered risk profile. The High availability impact reflects the potential for a broker crash via heap-buffer-overflow, which would immediately disconnect all MQTT clients - a significant operational impact in IoT deployments where NanoMQ serves as the central message router. The Low integrity impact reflects the semantic variant, where a malformed subscription is silently installed, potentially causing messages to be delivered to unintended subscribers. AC:H is the critical limiting factor: reliably triggering the crash path requires specific packet-length construction such that the missing Subscription Options byte falls precisely at the real heap allocation boundary - this requires deliberate crafting rather than opportunistic fuzzing. The semantic variant (silent subscription installation) is achievable with lower precision and may represent a more accessible attack surface. No EPSS data is available for this CVE, and the vulnerability is absent from CISA KEV, indicating no confirmed automated or widespread exploitation. The AC:H designation and absence of known exploit code suggest the current risk is primarily from targeted or research-grade actors rather than commodity attack tooling. Confidentiality impact is correctly rated N - the 1-byte OOB read is consumed internally by the parser and not reflected back to the attacker.

Exploit ScenarioDerived

An unauthenticated attacker with TCP access to the NanoMQ MQTT listener constructs an MQTT v5 SUBSCRIBE packet in which a subscription topic entry omits the mandatory 1-byte Subscription Options field, and sizes the total packet so that the parser's attempt to read the absent byte lands exactly at the end of the underlying heap allocation. Upon sending this packet, the broker's SUBSCRIBE parser performs a 1-byte out-of-bounds heap read, which may trigger a process crash - disrupting all MQTT clients connected to the broker and, in edge/IoT environments, halting dependent device telemetry pipelines. In the less-precisely-crafted variant, the broker silently installs the malformed subscription, causing unintended message routing without any visible error.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 20, 2026

NanoMQ's MQTT v5 SUBSCRIBE packet parser fails to enforce the mandatory 1-byte Subscription Options field, enabling remote unauthenticated attackers to submit malformed SUBSCRIBE packets that the broker silently accepts and installs into internal subscription state. Under a precisely crafted packet-length condition, the same defect manifests as a 1-byte heap-buffer-overflow (CWE-125), confirmed by ASAN, which can crash the broker and disrupt all connected MQTT clients. All NanoMQ releases up to and including 0.24.14 are affected; no confirmed active exploitation (KEV) or public exploit code has been identified at time of analysis, though the unauthenticated network attack surface warrants prompt remediation in internet-exposed deployments.

RemediationAI

Upgrade NanoMQ to a version beyond 0.24.14 as the primary fix. The exact patched release version is not independently confirmed from the available input data - consult the GitHub Security Advisory GHSA-w4xh-p384-w556 at https://github.com/nanomq/nanomq/security/advisories/GHSA-w4xh-p384-w556 to confirm the specific fixed release before upgrading. If immediate upgrade is not feasible, apply network-level restrictions to the MQTT listener ports (typically TCP 1883 for plaintext, TCP 8883 for TLS) using firewall rules, VPC security groups, or host-based access controls to permit only trusted, known MQTT clients - this reduces exposure to unauthenticated remote attackers but does not eliminate the vulnerability if a compromised or malicious client exists within the allowed network segment. Note that MQTT-level authentication (username/password or mutual TLS) does not prevent exploitation since the CVSS vector is PR:N, meaning the parser flaw is triggered before or independent of authentication state in the SUBSCRIBE processing path.

Affected VersionsENISA

nanomq ≤ 0.24.14

Affected Packages

euvd nanomq no fix

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 is a lightweight, embeddable MQTT broker designed for IoT and edge computing use cases (CPE: cpe:2.3:a:nanomq:nanomq:*:*:*:*:*:*:*:*). The vulnerability resides in the MQTT v5 protocol parser's SUBSCRIBE packet handler. In MQTT v5, each subscription entry within a SUBSCRIBE packet must terminate with exactly one Subscription Options byte encoding flags for QoS, No-Local, Retain-As-Published, and Retain-Handling. The NanoMQ parser does not validate the presence of this byte before attempting to read it; it consumes the byte unconditionally regardless of the packet's remaining-length boundary. CWE-125 (Out-of-bounds Read) characterizes the root cause: when the absent Subscription Options byte falls at the exact boundary of the underlying heap-allocated message buffer, the read crosses the real allocation boundary - a condition ASAN detects as a heap-buffer-overflow. When the out-of-bounds read does not cross the allocator boundary (the more common semantic path), the garbage byte is interpreted as a valid Subscription Options value and the malformed subscription entry is installed into the broker's internal subinfol subscription state, creating an integrity anomaly without a crash. Both effects are manifestations of the same missing-field validation defect.

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 6.5 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
vuln.today AI 6.5 MEDIUM

Network-reachable and unauthenticated (AV:N/PR:N), but AC:H because the crash path requires precise packet-length alignment; C:N since the 1-byte OOB read is not returned to the attacker.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

DescriptionCVE.org

NanoMQ contains a protocol-semantics flaw in its MQTT v5 SUBSCRIBE handling: if a subscription entry is missing the final 1-byte Subscription Options field, the broker may still accept the malformed packet and install the subscription into internal broker state. Under a specific packet-length construction, the same parser flaw also causes a 1-byte out-of-bounds read that crosses the real heap allocation boundary and is detected by ASAN as a heap-buffer-overflow.

If the consumed byte happens to look acceptable, NanoMQ may continue and append the malformed subscription entry into its internal subinfol state. In that case, a SUBSCRIBE packet that should be rejected by MQTT rules is instead treated as a successful subscription. Whether ASAN reports the bug does not depend on MQTT's logical remain boundary; it depends on whether the read crosses the real heap allocation boundary of the underlying message buffer. In other words, these are not two unrelated issues. They are two manifestations of the same parsing defect: by default, it appears as a semantic vulnerability, and under suitable input conditions, it also becomes a verifiable out-of-bounds read vulnerability.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
Low
niche IoT/edge MQTT broker with limited enterprise footprint
Data Quality
6 sources
Confidence: High

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
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.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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