
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-22040 is a Use-After-Free (UAF) vulnerability in NanoMQ MQTT Broker version 0.24.6 that allows a network-based attacker to trigger heap memory corruption, causing the broker process to crash with SIGABRT. The vulnerability was published on March 4, 2026, and a security advisory was released by the NanoMQ maintainers on GitHub. It affects NanoMQ version 0.24.6 specifically; at the time of initial publication no patched version was available, though a patch was subsequently indicated as available after March 18, 2026. The CVSS v3.1 base score is 5.3 (Medium) (GitHub Advisory, Red Hat CVE).
The vulnerability is classified as CWE-416 (Use After Free), rooted in improper memory management within NanoMQ's MQTT message handling pipeline. By combining three concurrent traffic patterns — high-frequency MQTT PUBLISH messages, rapid CONNECT/DISCONNECT cycles reusing the same ClientID (causing reconnect/kick-out races), and massive SUBSCRIBE/UNSUBSCRIBE jitter — an attacker can reliably induce a race condition that corrupts heap memory. The GDB backtrace from the advisory shows the crash originates in nni_mqtt_msg_free() → nni_msg_free() → nmq_tcptran_pipe_send_cb(), triggered from the nng:task thread, indicating a freed message object is accessed during the send callback. A proof-of-concept script (replay_uaf.py) is publicly available and can reliably reproduce the crash within approximately 3 minutes under typical conditions (GitHub Advisory).
Successful exploitation causes the NanoMQ broker process to terminate immediately with SIGABRT (free(): invalid pointer), resulting in a complete denial of service for all MQTT message brokering functions until the process is manually restarted. There is no confidentiality or integrity impact — the vulnerability is purely an availability issue. However, the advisory notes that heap memory corruption bugs may lead to more severe consequences (e.g., potential code execution) in certain environments or configurations, though no such exploitation has been demonstrated (GitHub Advisory).
A public proof-of-concept exploit (replay_uaf.py) is available in the GitHub security advisory and can reliably trigger the crash within 3 minutes. No authentication or special privileges are required — any client able to establish an MQTT connection and send valid control packets (SUB/UNSUB/CONNECT/PUBLISH) can exploit this vulnerability. There is no evidence of in-the-wild exploitation at this time. The EPSS score is approximately 0.034% (0.000340), indicating low probability of near-term exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (GitHub Advisory, Feedly).
nmq_tcptran_pipe_send_cb() send callback, where a freed nni_mqtt_msg object is accessed, corrupting heap metadata and causing the broker to abort with SIGABRT (free(): invalid pointer) — typically within 3 minutes (GitHub Advisory).nanomq) terminating unexpectedly with SIGABRT; core dump files generated in the broker's working directory referencing free(): invalid pointer in malloc_printerr./var/log/syslog or journalctl) showing nanomq process killed by signal 6 (SIGABRT); broker logs indicating abnormal termination without graceful shutdown.core.*) in the NanoMQ working directory containing stack traces referencing nni_mqtt_msg_free, nni_msg_free, or nmq_tcptran_pipe_send_cb (GitHub Advisory).Upgrade NanoMQ MQTT Broker to a version released after the patch date of March 18, 2026, as indicated in the security advisory. As an interim workaround, implement network-level access controls (firewall rules, broker authentication) to restrict which clients can connect to the broker, limiting exposure to untrusted clients. Additionally, configure broker-level rate limiting on CONNECT/DISCONNECT cycles and SUBSCRIBE/UNSUBSCRIBE operations per ClientID where supported, and implement automated process restart mechanisms (e.g., systemd Restart=always) to minimize downtime if a crash occurs (GitHub Advisory).
The vulnerability was reported by security researcher "Fuzz0X" and published via the NanoMQ GitHub security advisory by maintainer JaylinYu on March 4, 2026. A technical write-up was published at infinitsec.net shortly after disclosure. Community reaction has been limited given the moderate severity score and narrow affected product scope; no major media coverage or significant social media discussion has been identified beyond standard CVE tracking feeds (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."