CVE-2026-35217
Received Received - Intake

NanoMQ MQTT v5 SUBSCRIBE Parsing Heap Buffer Overflow

Vulnerability report for CVE-2026-35217, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-20

Last updated on: 2026-07-20

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-20
Last Modified
2026-07-20
Generated
2026-07-21
AI Q&A
2026-07-20
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
nanomq nanomq to 0.25 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

NanoMQ has a flaw in handling MQTT v5 SUBSCRIBE packets. If a packet is missing the final 1-byte Subscription Options field, the broker may still accept it and create a subscription. This happens because the parser does not check boundaries before reading a byte. In some cases, this also causes a 1-byte out-of-bounds read that can be detected by AddressSanitizer as a heap-buffer-overflow.

Detection Guidance

To detect this vulnerability, monitor for malformed MQTT v5 SUBSCRIBE packets missing the final 1-byte Subscription Options field. Use network traffic analyzers like Wireshark to inspect MQTT packets for improperly formatted SUBSCRIBE requests. Enable AddressSanitizer (ASAN) in NanoMQ builds to detect heap-buffer-overflow errors during packet parsing.

Impact Analysis

This vulnerability could allow an attacker to create invalid subscriptions on the broker, leading to incorrect subscription state. In rare cases, it might also cause heap corruption, potentially crashing the broker or enabling further attacks.

Compliance Impact

This vulnerability primarily impacts data integrity and availability due to incorrect subscription handling and potential heap corruption. While it does not directly expose personal data, it could lead to unauthorized message routing or service disruption, which may violate GDPR's integrity principle or HIPAA's security requirements for protected health information systems.

Mitigation Strategies

Immediately upgrade NanoMQ to a patched version if available. If no patch exists, restrict network access to MQTT brokers, filter malformed MQTT packets at the firewall, and monitor broker logs for suspicious subscription activities. Disable MQTT v5 support if not required.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-35217. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart