CVE-2025-59946
NixOS vulnerability analysis and mitigation

Overview

CVE-2025-59946 is a heap use-after-free vulnerability in NanoMQ MQTT Broker (an Edge Messaging Platform by EMQX) caused by a data race condition in the subscription info list management. It affects all NanoMQ versions prior to 0.24.2 (with the full fix delivered in 0.24.4). The vulnerability was published on December 27, 2025, and assigned a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory, Red Hat CVE).

Technical details

The root cause is a classical data race condition (CWE-416: Use After Free) in NanoMQ's subscription info list handling. When concurrent subscribe/unsubscribe operations overlap within a narrow timing window, a thread can access heap memory that has already been freed by another thread, leading to a heap use-after-free crash. Exploitation requires a low-privileged authenticated attacker to send crafted MQTT packets at high concurrency to trigger the race condition; a public PoC (raw MQTT byte sequence piped via nc) was disclosed in GitHub issue #1863, demonstrating broker crashes with varying AddressSanitizer stack traces indicative of the race (GitHub Issue, GitHub Advisory).

Impact

Successful exploitation can cause the NanoMQ broker process to crash (denial of service) and, due to the nature of heap use-after-free memory corruption, potentially enables arbitrary code execution on the affected host. All three security dimensions are rated High: confidentiality, integrity, and availability. Because NanoMQ is commonly deployed as an edge IoT messaging broker, a crash or compromise could disrupt downstream IoT device communication and potentially expose sensitive telemetry data (GitHub Advisory).

Exploitability

A proof-of-concept exploit consisting of crafted raw MQTT packet sequences is publicly available in GitHub issue #1863, demonstrating repeatable broker crashes. There is no evidence of active in-the-wild exploitation at this time, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.042%, reflecting low current exploitation probability. Exploitation requires low-privilege authenticated network access and high attack complexity due to the race condition timing requirement (GitHub Issue, GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify NanoMQ MQTT broker instances (default port 1883/TCP) running versions prior to 0.24.4 using network scanning tools such as Shodan, Censys, or nmap.
  2. Authentication: Obtain low-privilege MQTT credentials (or connect to a broker with no authentication configured) to establish a connection.
  3. Craft malicious MQTT packets: Prepare raw MQTT CONNECT, SUBSCRIBE, and UNSUBSCRIBE packet sequences as demonstrated in the public PoC (hex-encoded byte streams from GitHub issue #1863).
  4. Trigger the race condition: Send the crafted packets repeatedly and at high concurrency (e.g., using multiple parallel nc connections or a scripted MQTT client) to create overlapping subscribe/unsubscribe operations that hit the race window in the sub info list.
  5. Achieve crash or code execution: The heap use-after-free condition is triggered, causing the broker to crash (DoS) or, under favorable memory layout conditions, potentially enabling arbitrary code execution (GitHub Issue, GitHub Advisory).

Indicators of compromise

  • Network: Unusually high volume of concurrent MQTT SUBSCRIBE/UNSUBSCRIBE packets from a single client IP on port 1883; raw MQTT connections sending malformed or oversized packet sequences.
  • Logs: NanoMQ process crash logs or core dumps; AddressSanitizer (ASAN) output referencing heap-use-after-free in subscription list handling functions.
  • Process: Unexpected termination or restart of the nanomq broker process; abnormal memory usage spikes preceding a crash.
  • File System: Presence of core dump files in the NanoMQ working directory following unexpected process termination (GitHub Issue).

Mitigation and workarounds

Upgrade NanoMQ to version 0.24.4 or later, which contains the complete fix for this vulnerability (the initial patch was in 0.24.2, with the full resolution delivered in 0.24.4). As a temporary workaround, operators can limit the rate of subscribe/unsubscribe operations per client to reduce the probability of triggering the race condition window; however, the vendor notes no reliable workaround exists beyond rate limiting. Additionally, restricting network access to the MQTT broker and enforcing authentication controls reduces the attack surface to authenticated users only (GitHub Advisory).

Community reactions

The vulnerability received brief coverage on security aggregation platforms and social media shortly after disclosure in late December 2025, including posts on Bluesky and Mastodon (TheHackerWire). CISA included it in their weekly vulnerability bulletin (SB25-363) for the week of December 22, 2025. No significant vendor statements beyond the GitHub security advisory or notable independent researcher commentary have been identified (CISA Bulletin).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-91782LOW1.9
  • NixOS logoNixOS
  • binutils
NoYesSep 15, 2026
CVE-2026-91781LOW1.9
  • NixOS logoNixOS
  • binutils
NoYesSep 15, 2026
CVE-2026-91780LOW1.9
  • NixOS logoNixOS
  • binutils
NoNoSep 15, 2026
CVE-2026-91779LOW1.9
  • NixOS logoNixOS
  • binutils
NoNoSep 15, 2026
CVE-2026-90831LOW1.9
  • NixOS logoNixOS
  • gcc-toolset-15-binutils-devel
NoYesSep 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management