GHSA-m7mp-rr3v-hmhr: NanoMQ: Infinite Loop in UNSUBSCRIBE Decoder Leading to Remote DoS

Published Sep 18, 2026
·
Updated

NanoMQ is an MQTT broker. Prior to 0.24.14, the NanoMQ client function nnimqttmsgdecodeunsubscribe() in nng/src/supplemental/mqtt/mqttcodec.c does not handle a failed readuint16() while counting topics in a malformed UNSUBSCRIBE packet. A zero-length topic followed by trailing data can leave buf.curpos unchanged while topiccount continues to increase, allowing a malicious MQTT broker to hang a connecting MQTT 3.1.1 client, consume CPU and memory, and repeatedly deny service when automatic reconnection is enabled. The broker-side nmqunsubinfodecode path is not affected. This issue is fixed in version 0.24.14.

Affected Software

1 affected component
nanomq nanomq<0.24.14

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade NanoMQ to a version that resolves this vulnerability.

    Fixed in 0.24.14

Event History

Sep 18, 2026
CVE Published
via OSV·04:18 PM
Data Sourced
via OSV·04:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which NanoMQ deployments are exposed to this issue?

The affected code is in the NanoMQ MQTT client decoder, so systems that connect as MQTT 3.1.1 clients to an untrusted or malicious broker are exposed. The broker-side nmq_unsubinfo_decode path is not affected.

2

What must an attacker control to trigger the denial of service?

An attacker needs to operate or control the MQTT broker that the NanoMQ client connects to and send a malformed UNSUBSCRIBE packet. The packet condition described is a zero-length topic followed by trailing data.

3

Does automatic reconnection worsen the impact?

Yes. When automatic reconnection is enabled, the malicious broker can repeatedly trigger the condition after reconnects, causing recurring denial of service and continued CPU and memory consumption.

4

What version resolves the issue?

The issue is fixed in NanoMQ version 0.24.14. Versions prior to 0.24.14 are affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203