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

Source: https://junglewise.ai/threats/cve-2026-85058-moquette-mqtt-broker-authorization-bypass-in-will-message  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-18. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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

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.

Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [Moquette](https://junglewise.ai/threats/vendors/moquette).

## Quick answers

**Is CVE-2026-85058 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-85058 being exploited in the wild.

**How severe is CVE-2026-85058?** High severity, with a CVSS score of 7.5, published 18 September 2026.

**Which products and versions are affected?** io.moquette:moquette-broker (Maven) < 0.18.1, ECOSYSTEM:introduced=0,fixed=0.18.1; Moquette MQTT Broker 0.18.0 and likely earlier versions.

**Is there a fix for CVE-2026-85058?** Yes. io.moquette:moquette-broker (Maven): upgrade to 0.18.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-85058 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-85058?** Check whether you run io.moquette:moquette-broker (Maven) or Moquette MQTT Broker at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- io.moquette:moquette-broker (Maven): upgrade to 0.18.1 or later

  ```sh
  # set io.moquette:moquette-broker to 0.18.1 in your pom.xml or build.gradle
  ```


## 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

## Identifiers

- CVE-2026-85058
- GHSA-9jjc-fw8x-fmwx

## Timeline

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

## Related threats

- [Moquette MQTT broker pattern-ACL wildcard injection and authorization bypass](https://junglewise.ai/threats/cve-2026-85724-moquette-mqtt-broker-pattern-acl-wildcard-injection-and)
