CVE-2026-35217 in NanoMQinfo

Summary

by MITRE • 07/20/2026

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.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 07/20/2026

The vulnerability in NanoMQ represents a critical protocol-semantics flaw within its MQTT v5 implementation that demonstrates how seemingly minor parsing errors can cascade into significant security implications. This issue specifically affects the handling of SUBSCRIBE packets where the subscription options field is omitted from the final byte of each subscription entry. The flaw exists at the core of MQTT protocol compliance, where proper packet structure is essential for maintaining broker integrity and preventing unauthorized access to message topics. Such vulnerabilities directly relate to CWE-129, which addresses improper validation of array indices, and also aligns with ATT&CK technique T1070.004 for bypassing security controls through protocol manipulation.

The technical implementation of this vulnerability stems from inadequate bounds checking during packet parsing operations within NanoMQ's MQTT v5 broker component. When a SUBSCRIBE packet arrives without the required 1-byte Subscription Options field, the parser fails to properly validate the packet structure before proceeding with subscription processing. This parsing defect creates two distinct but related security consequences that manifest under different input conditions. The first manifestation occurs when the malformed packet is accepted and processed, allowing subscriptions to be installed into the broker's internal subinfol state despite violating MQTT protocol specifications. This creates a semantic vulnerability where legitimate protocol violations are treated as valid operations, potentially enabling unauthorized topic access or subscription manipulation.

The second manifestation emerges as a heap-buffer-overflow condition that occurs when an out-of-bounds read crosses actual heap allocation boundaries. This specific scenario is detected by AddressSanitizer (ASAN) and represents a more severe memory corruption vulnerability that can lead to system instability or potential exploitation. The timing and conditions for triggering the heap overflow depend entirely on the byte values within the malformed packet and how they interact with the underlying memory layout of the message buffer. This demonstrates how protocol-level parsing errors can directly translate into memory safety issues, with the same root cause producing both logical security flaws and exploitable memory corruption vulnerabilities.

The operational impact of this vulnerability extends beyond simple protocol compliance failures to potentially compromise broker security and availability. When subscriptions are incorrectly processed due to missing options fields, attackers could manipulate the broker's subscription state to gain unauthorized access to topics or create denial-of-service conditions through malformed packet injection. The vulnerability affects the fundamental trust model of MQTT brokers where proper subscription handling ensures message routing security and prevents unauthorized topic access. From an ATT&CK perspective, this vulnerability enables techniques such as T1566.001 for credential manipulation and T1499.004 for endpoint denial of service through protocol exploitation.

Mitigation strategies for this vulnerability require comprehensive input validation and bounds checking mechanisms within the MQTT packet parser. The fix must ensure that all subscription entries in SUBSCRIBE packets contain properly structured subscription options fields before any processing occurs. This includes implementing strict validation of packet boundaries and memory access patterns to prevent both semantic violations and memory corruption conditions. Organizations should also consider applying immediate patches to NanoMQ installations and implementing monitoring for malformed MQTT packets that could indicate exploitation attempts. Additionally, defensive programming practices such as bounds checking, memory sanitization, and input validation should be enforced throughout the broker's MQTT handling components to prevent similar issues from arising in other protocol implementations.

Responsible

GitHub M

Reservation

04/01/2026

Disclosure

07/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you know our Splunk app?

Download it now for free!