{"id":"CVE-2025-68699","summary":"NanoMQ $share/ Subscription Validation and Forwarding Parsing Inconsistency: NULL Pointer Increment Causes Crash","details":"NanoMQ MQTT Broker (NanoMQ) is an all-around Edge Messaging Platform. In version 0.24.6, NanoMQ has a protocol parsing / forwarding inconsistency when handling shared subscriptions ($share/). A malformed SUBSCRIBE topic such as $share/ab (missing the second /) is not strictly validated during the subscription stage, so the invalid Topic Filter is stored into the subscription table. Later, when any PUBLISH matches this subscription, the broker send path (nmq_pipe_send_start_v4/v5) performs a second $share/ parsing using strchr() and increments the returned pointer without NULL checks. If the second strchr() returns NULL, sub_topic++ turns the pointer into an invalid address (e.g. 0x1). This invalid pointer is then passed into topic_filtern(), which triggers strlen() and crashes with SIGSEGV. The crash is stable and remotely triggerable. This issue has been patched in version 0.24.7.","aliases":["GHSA-qv5f-c6v2-2f8h"],"modified":"2026-08-12T15:14:53.925958Z","published":"2026-02-04T19:25:12.716Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68699.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-476"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68699.json"},{"type":"ADVISORY","url":"https://github.com/nanomq/nanomq/security/advisories/GHSA-qv5f-c6v2-2f8h"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68699"},{"type":"FIX","url":"https://github.com/nanomq/nanomq/commit/89d68d678e7f841ae7baa45cba8d9bc7ddc9ef4b"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/nanomq/nanomq","events":[{"introduced":"dc3a3136cd82d5c005b8cd26a65fe53beaaf0eb9"},{"fixed":"89d68d678e7f841ae7baa45cba8d9bc7ddc9ef4b"}],"database_specific":{"cpe":"cpe:2.3:a:emqx:nanomq:0.24.6:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0.24.6"},{"last_affected":"0.24.6"}],"source":["CPE_STRING","REFERENCES"]}}],"versions":["0.24.6","= 0.24.6"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68699.json","vanir_signatures_modified":"2026-08-12T15:14:53Z","vanir_signatures":[{"deprecated":false,"digest":{"function_hash":"310497582721063528643753849206017306310","length":3400},"id":"CVE-2025-68699-65738b67","signature_type":"Function","signature_version":"v1","source":"https://github.com/nanomq/nanomq/commit/89d68d678e7f841ae7baa45cba8d9bc7ddc9ef4b","target":{"file":"nanomq/sub_handler.c","function":"decode_sub_msg"}},{"source":"https://github.com/nanomq/nanomq/commit/89d68d678e7f841ae7baa45cba8d9bc7ddc9ef4b","target":{"file":"nanomq/sub_handler.c"},"deprecated":false,"digest":{"line_hashes":["148264463702639014445328608625644980351","117947634385951628594612798951377727625","41346191352829948806448050848932223453","229002528819622269653400236844159766664","285738955883243541372447950489972748231","153811760593078631432581308123868832465","136285553792020661809863699701129605377","174054833792398501351385306226073447586"],"threshold":0.9},"id":"CVE-2025-68699-fe3008e0","signature_type":"Line","signature_version":"v1"}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"}]}