CVE-2025-59947 is a heap buffer overflow in NanoMQ, the open-source MQTT broker that runs on IoT edge gateways. A PUBLISH message that matches both a shared subscription and a normal subscription makes the broker write past a buffer. NVD scores it 9.0. NanoMQ fixes it in 0.24.4; until then, disable shared subscriptions.
Vulnerability summary
CVSS base score
9
Critical severity
EPSS score (FIRST)
0.3%
Probability of exploitation in the wild in the next 30 days
CISA KEV catalog
No
Not listed
Published
Vulnerability ID: CVE-2025-59947 · Source: NVD
Affected components
| Component | CPE | Version range |
|---|---|---|
| NanoMQ MQTT broker (EMQ) | cpe:2.3:a:emqx:nanomq:*:*:*:*:*:*:*:* | before 0.24.4 (NVD CPE, CVE description); fixed in 0.24.4 (NanoMQ GHSA-98f4-cmg8-x7f3). The overflow was reported against 0.24.2 |
What does this mean for affected devices?
NVD carries the GitHub CNA description: "NanoMQ is a messaging broker/bus for IoT Edge & SDV. Versions prior to 0.24.4 have a buffer overflow case while the PUBLISH packets trigger both shared subscription and vanila subscription. This is fixed in version 0.24.4. As a workaround, disable shared subscription." The weakness is CWE-120, a classic buffer copy without a size check, from the CNA. The record was published on 2025-12-15 (NVD, CVE record).
How severe is it, and who scored it?
NVD's Primary score is CVSS v3.1 9.0 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H). NVD's analysis treats it as reachable over the network by a client with low privileges, with a scope change and high impact on all three properties. The GitHub CNA scores it CVSS v4.0 8.5 (CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:H/VA:H/SC:L/SI:H/SA:H). NVD's CPE covers NanoMQ versions before 0.24.4.
What goes wrong in the broker?
The NanoMQ security advisory GHSA-98f4-cmg8-x7f3, published on 2025-12-14, points to issue #2110. That report shows an AddressSanitizer heap-buffer-overflow on NanoMQ 0.24.2: a 4-byte write just past a 24-byte region in foreach_client in pub_handler.c, reached from handle_pub while the broker fans a PUBLISH out to its subscribers. The advisory credits roman-kraus-fokus as reporter and JaylinYu as the developer who fixed it. The fix is commit 5f55810 ("FIX [pub_handler] fix #2110"), which changes only nanomq/pub_handler.c.
Which versions are affected and where is the fix?
| Source | Affected | Fixed |
|---|---|---|
| NVD CPE and CVE description | before 0.24.4 | 0.24.4 |
| GHSA-98f4-cmg8-x7f3 | listed as "< 0.24.2", reported on 0.24.2 | 0.24.4 |
The advisory's affected range is narrower than its own report, which was made against 0.24.2, so treat every release before 0.24.4 as affected. The fix commit was already listed in the 0.24.3 release notes (2025-09-15), which mention two security fixes credited to the same reporter. The advisory and NVD name 0.24.4 (released 2025-09-22) as the fixed version, and that is the safe target.
What should gateway makers and operators do?
Ship NanoMQ 0.24.4 or later in the gateway image and check the version in your SBOM, because an embedded broker is rarely updated on its own. Where the image cannot be updated right away, the advisory's workaround is to disable shared subscriptions. Any client that can publish can reach this code, so restrict which clients may connect and publish. A broker crash stops every Sparkplug B Edge Node and host at once, as the Sparkplug B protocol security guide explains, and the MQTT protocol security guide covers broker access control. Comparable broker flaws in Eclipse Mosquitto are CVE-2024-3935 and CVE-2024-8376. For the bug class, see the memory corruption fix guide.
CVE-2025-59947 is not in the CISA KEV catalog as of 2026-11-23 (catalog version 2026.11.20, 1,790 entries). FIRST EPSS gives it 0.00349, the 29.2nd percentile, in the 2026-11-22 dataset (CISA KEV, FIRST EPSS).
Evidence
- NVD (read 2026-11-23): status Analyzed; published 2025-12-15; NVD Primary CVSS v3.1 9.0 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H; GitHub CNA Secondary CVSS v4.0 8.5; CWE-120 (GitHub CNA); CPE cpe:2.3:a:emqx:nanomq versions before 0.24.4. — NVD
- NanoMQ GHSA-98f4-cmg8-x7f3 (published 2025-12-14), read 2026-11-23: buffer overflow when PUBLISH triggers both shared and normal subscriptions, issue #2110; patched 0.24.4; vulnerable range listed as < 0.24.2; workaround disable shared subscription; CVSS v4.0 8.5; credits roman-kraus-fokus (reporter), JaylinYu (remediation developer). — NanoMQ GitHub security advisory
- Issue #2110 (closed 2025-09-02): ASan heap-buffer-overflow on NanoMQ 0.24.2, WRITE of size 4 in foreach_client pub_handler.c:127 from handle_pub; fix commit 5f55810 (2025-09-04) changes nanomq/pub_handler.c; commit contained in tags 0.24.3 (released 2025-09-15) and 0.24.4 (released 2025-09-22). — NanoMQ GitHub
- CVE record (checked 2026-11-23): state PUBLISHED, CNA GitHub_M, published 2025-12-15. — CVE.org
- Not in the CISA KEV catalog, catalog version 2026.11.20, 1,790 entries, checked 2026-11-23. — CISA KEV
- EPSS 0.00349, percentile 0.29161, dataset 2026-11-22, read 2026-11-23. — FIRST EPSS

Related advisories
Sources
Frequently asked questions
Which NanoMQ version fixes CVE-2025-59947?
NanoMQ 0.24.4, released on 2025-09-22, per the NanoMQ advisory GHSA-98f4-cmg8-x7f3 and the NVD record. The fix commit for issue #2110 already appears in the 0.24.3 release notes, but 0.24.4 is the version the advisory names.
Is there a workaround if I cannot update the broker yet?
Yes. The advisory says to disable shared subscriptions. The overflow only happens when one PUBLISH matches both a shared subscription and a normal subscription, so a broker without shared subscriptions does not reach the faulty path.
Why does NVD score it 9.0 when the CNA scores 8.5?
They use different CVSS versions. NVD's Primary score is CVSS v3.1 9.0 with a scope change and high impact on confidentiality, integrity and availability. The GitHub CNA scores CVSS v4.0 8.5. Both need a low-privileged client and some user interaction.
Is CVE-2025-59947 in the CISA KEV catalog?
No, not as of 2026-11-23 (catalog version 2026.11.20, 1,790 entries). FIRST EPSS rates it 0.00349 (29.2nd percentile) in the 2026-11-22 dataset.
Questions about this page?