Junglewise Threat Intelligence

CVE-2026-85058: Moquette MQTT Broker authorization bypass in Will message publishing

CVE-2026-85058 · Severity: high · CVSS 7.5 · Published 2026-09-18

Executive brief

Moquette MQTT Broker fails to enforce access control rules when publishing Will (Last Testament) messages, which are automatically sent when a client disconnects abnormally. An attacker can exploit this by setting a restricted topic as the Will Topic and forcing a disconnection, allowing message injection into any protected topic. When combined with vulnerable message handling on the subscriber side (such as Java deserialization), this can lead to remote code execution on connected devices.

Technical details

The vulnerability is an authorization bypass in the Will message publishing path. In MQTT, Will messages are sent by the broker on behalf of a client that disconnects abnormally (without sending a proper DISCONNECT packet). Moquette's normal PUBLISH paths correctly invoke `authorizator.canWrite()` before publishing, but the Will publishing path (`fireWill()` → `publishWill()` → `publish2Subscribers()`) completely bypasses this check. An unauthenticated attacker (when `allow_anonymous=true`, the default) can connect with a Will Topic set to an ACL-restricted topic, then trigger an abnormal disconnection (TCP RST), causing the broker to publish the Will message without authorization checks. The root cause is in `PostOffice.java` where Will message handling lacks the `canWrite()` authorization check present in all other publishing paths. Patches should add ACL enforcement to the Will publishing flow.

Affected products

  • Moquette Moquette MQTT Broker 0.18.0 and likely earlier versions

Timeline

  • 2026-09-18: disclosed: GitHub Advisory GHSA-9jjc-fw8x-fmwx published
  • 2024-12-27: other: Vulnerability verified against v0.18.0

Related threats