# CVE-2026-35217: NanoMQ MQTT v5 SUBSCRIBE out-of-bounds read and semantic flaw

Source: https://junglewise.ai/threats/cve-2026-35217-nanomq-mqtt-v5-subscribe-out-of-bounds-read-and-semantic-flaw  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-20. Updated: 2026-07-20  
License: CC BY 4.0 with a link back

CVE-2026-35217 · Severity: medium · CVSS 6.5 · Published 2026-07-20

NanoMQ, an ultra-lightweight MQTT broker for IoT and edge computing, contains a flaw in how it processes subscription requests. An attacker can send a specially crafted, malformed message that bypasses security checks, potentially allowing unauthorized message subscriptions or causing the service to crash. This could lead to data being sent to unintended recipients or a disruption of communication between IoT devices.

Technologies: [EMQ NanoMQ](https://junglewise.ai/threats/technologies/nanomq). Vendors: [EMQ](https://junglewise.ai/threats/vendors/emq).

## Quick answers

**Is CVE-2026-35217 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-35217 being exploited in the wild.

**How severe is CVE-2026-35217?** Medium severity, with a CVSS score of 6.5, published 20 July 2026.

**Which products and versions are affected?** EMQ NanoMQ <= 0.24.14.

**Is there a fix for CVE-2026-35217?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-35217 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-35217?** Check whether you run EMQ NanoMQ at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A vulnerability exists in nmq_subinfo_decode() within nng/src/sp/protocol/mqtt/mqtt_parser.c due to an off-by-one boundary check. When an MQTT v5 SUBSCRIBE packet is missing the 1-byte 'Subscription Options' field, the parser uses a 'bpos > remain' check that allows a read to occur when 'bpos == remain'. This results in a 1-byte out-of-bounds read. Depending on the heap layout and message size (specifically when the message body is exactly 1024 bytes, triggering an exact allocation in nni_msg_alloc), this can manifest as a heap-buffer-overflow or as a semantic flaw where malformed subscriptions are incorrectly accepted and installed into the broker's internal state.

## Affected products

- nanomq NanoMQ <= 0.24.14

## Timeline

- 2026-06-23: advisory: GitHub Security Advisory published
- 2026-07-20: disclosed: NVD publication date

## References

- [https://github.com/nanomq/nanomq/security/advisories/GHSA-w4xh-p384-w556](https://github.com/nanomq/nanomq/security/advisories/GHSA-w4xh-p384-w556)

## Related threats

- [NanoMQ NULL pointer dereference in REST API properties_parse](https://junglewise.ai/threats/cve-2026-47276-nanomq-null-pointer-dereference-in-rest-api-properties-parse)
- [NanoMQ NULL pointer dereference in nni_mqttv5_msg_decode_connect](https://junglewise.ai/threats/cve-2026-47275-nanomq-null-pointer-dereference-in-nni-mqttv5-msg-decode-connect)
- [EMQ NanoMQ denial of service via memory leak in nni_qos_db_set](https://junglewise.ai/threats/cve-2026-36590-emq-nanomq-denial-of-service-via-memory-leak-in-nni-qos-db-set)
- [NanoMQ type confusion in QUIC dialer close path](https://junglewise.ai/threats/cve-2026-44640-nanomq-type-confusion-in-quic-dialer-close-path)
- [NanoMQ NULL pointer dereference in tcptran_pipe_peer](https://junglewise.ai/threats/cve-2026-32134-nanomq-null-pointer-dereference-in-tcptran-pipe-peer)
