CVE-2026-85724: Moquette Denial of Service Vulnerability

CRITICAL
Advisory Identifier: GHSA-5f42-97gr-vfhq
CVSS 9.6
Published
Advisory Summary

CVE-2026-85724 is a CRITICAL (CVSS 9.6) denial of service vulnerability (General Security Weakness) affecting Moquette libraries in the Maven ecosystem. The issue involves pattern-acl wildcard injection (cross-tenant authorization bypass) plus a remote-unauthenticated dos cluster, a will-message authorization bypass, and a cross-session durable-corruption bug. Remediation is available by upgrading affected packages to version 0.18.1.

CVE-2026-85724 at a Glance

CVE Identifier CVE-2026-85724
GHSA Identifier GHSA-5f42-97gr-vfhq
Severity CRITICAL
CVSS v3.1 Base Score 9.6
CWE Classification General Security Weakness
Affected Product Moquette
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-85724

To remediate this vulnerability, upgrade all affected Moquette dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

io.moquette:moquette-broker fixed: 0.18.1
<dependency>
    <groupId>io.moquette</groupId>
    <artifactId>moquette-broker</artifactId>
    <version>0.18.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=io.moquette

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-85724, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=io.moquette

Analyze the terminal output to locate any version of Moquette in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.18.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=io.moquette command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Moquette, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

moquette is reachable by untrusted MQTT clients (anonymous by default), so every byte from any client, including pre-authentication, is untrusted. This is a memory-safe JVM: the ceiling is authorization/ACL bypass + denial of service + cross-session integrity, **not RCE** (I did not find one and do not claim one). Audited at commit `da7f719a6bab9829d520b5838e13ea7b1f9be3ef`, module `broker/`. ## What a connecting client can do 1. (Critical) Bypass `pattern`-based ACLs across tenants. In `AuthorizationsCollector.canDoOperation` (AuthorizationsCollector.java:116-131, esp. line 123) the clientId/username is substituted raw into a pattern ACL rule and then wildcard-matched, and the clientId is never validated for MQTT wildcard characters +/# at CONNECT (MQTTConnection.processConnect): Topic substitutedTopic = new Topic(auth.topic.toString().replace("%c", client).replace("%u", username)); if (topic.match(substitutedTopic)) return true; A client that connects with clientId + turns sensor/%c/# into the filter sensor/+/#, gaining cross-tenant read AND write. (Precondition: pattern ACL rules configured — a common multi-tenant setup.) 2. (High) Crash the whole broker. SessionEventLoop (SessionEventLoop.java:40-54) catches only InterruptedException and is never restarted (SessionEventLoopGroup), so any uncaught exception on it wedges every co-located client. Trivially reachable inputs: malformed $share/grp SUBSCRIBE (SharedSubscriptionUtils.extractShareName -> StringIndexOutOfBoundsException), deeply nested topic (CTrie recursion -> StackOverflowError), and ACL NPE below. Unbounded subscriptions / retained / in-flight / topic-alias / interceptor state (BrokerInterceptor uses an unbounded queue) also allow OOM; durable stores allow disk exhaustion. 3. (High) NPE in ACL sink on clientId # (invalid filter sensor/#/# -> null tokens -> Topic.match NPE at Topic.java:173). 4. (High) Will-message authorization bypass. Last-Will topic is published (PostOffice.publishWill) without canWrite/reserved-topic checks used for normal PUBLISH. 5. (Medium) Cross-session durable corruption. H2PersistentQueue opens queue_"+clientId and queue_"+clientId+"_meta; client id sensor_meta collides with victim sensor metadata map -> corrupts head/tail. 6. (Medium) Fail-open if authenticator/authorizator class fails to load -> PermitAll/AcceptAll (Server.java:483-531). ## Proof of concept Source-only, no network; PoCs run on JDK 17: - PoCPatternAcl — clientId + gains cross-tenant read/write; clientId # triggers NPE - PoCSharedSubCrash — extractShareName("$share/grp") throws StringIndexOutOfBoundsException - PoCMapCollision — H2 MVStore collision overwrites victim metadata pointer ## Impact Cross-tenant eavesdropping and injection, whole-broker DoS, unauthorized Will publishes, and cross-session durable corruption. ## Remediation 1. Reject clientId/username containing +/# (and / if structural) at CONNECT; expand %c/%u as literal tokens. 2. Harden SessionEventLoop (catch Throwable + restart supervision) and validate $share filters. 3. Apply authorization to Will publishes like normal PUBLISH. 4. Add resource caps (connections, queues, retained, aliases, interceptor queue) + bounded session expiry. 5. Separate H2 namespaces and fail closed on auth-class load failure.

CVE-2026-85724 Affected Moquette Versions

1 component(s)
Fixed Versions:
0.18.1
Product / Package Ecosystem Affected Versions Fixed Version
io.moquette:moquette-broker
Maven
< 0.18.1
0.18.1

References

GitHub Advisory / Wiki ADVISORY
https://github.com/moquette-io/moquette/security/advisories/GHSA-5f42-97gr-vfhq
Moquette Source Repository REPOSITORY
https://github.com/moquette-io/moquette/pull/957
Moquette Source Repository REPOSITORY
https://github.com/moquette-io/moquette/pull/958
Moquette Source Repository REPOSITORY
https://github.com/moquette-io/moquette/pull/959
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/14a2f4fd280c8f6a791600c306cbccecb7c67007
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/26498631e92d50440b4e3ed42fa546253cc4090c
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/72d6c8257191d2e4b2e3aa11ab25fd09f88c6cb7
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/86feb7c31e6fac849c465d8079d08c0e7ef01cdf
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/affdc71fdba92dc020421678970ae70518fb6da2
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/b4a98bb3f3425ece476ed073aa080c627c1239af
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/c65b3e90fa03e562e2c2fa69c3ee916c2cbfbd2b
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/ca17e0be19e86d5e291f4532dfdc94616c8e0049
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/d77753542e262b7aa573dee3c2b05e44439bbd96
Security Fix Commit FIX COMMIT
https://github.com/moquette-io/moquette/commit/f5a323fe782d1505c0097498cb22eb6ec6c96973
Moquette Source Repository REPOSITORY
https://github.com/moquette-io/moquette
Moquette Release RELEASE
https://github.com/moquette-io/moquette/releases/tag/v0.18.1

Frequently Asked Questions

What is CVE-2026-85724?
CVE-2026-85724 is a security vulnerability in Moquette involving Pattern-ACL wildcard injection (cross-tenant authorization bypass) plus a remote-unauthenticated DoS cluster, a Will-message authorization bypass, and a cross-session durable-corruption bug under General Security Weakness.
Which Moquette versions are affected?
Affected versions include releases prior to 0.18.1 across affected packages: io.moquette:moquette-broker.
What version fixes CVE-2026-85724?
Upgrading to 0.18.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is moquette-broker affected?
Yes, io.moquette:moquette-broker is affected in releases prior to 0.18.1. Upgrade your dependency to 0.18.1 or later.
What is the CVSS score of CVE-2026-85724?
CVE-2026-85724 has a CVSS v3.1 base score of 9.6 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-85724?
CVE-2026-85724 is classified under General Security Weakness.
How can I check Maven dependencies for CVE-2026-85724?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=io.moquette'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5f42-97gr-vfhq",
  "modified" : "2026-09-23T16:11:18Z",
  "published" : "2026-09-23T16:11:18Z",
  "aliases" : [ "CVE-2026-85724" ],
  "summary" : "Moquette: Pattern-ACL wildcard injection (cross-tenant authorization bypass) plus a remote-unauthenticated DoS cluster, a Will-message authorization bypass, and a cross-session durable-corruption bug",
  "details" : "moquette is reachable by untrusted MQTT clients (anonymous by default), so every byte from any client, including pre-authentication, is untrusted. This is a memory-safe JVM: the ceiling is authorization/ACL bypass + denial of service + cross-session integrity, **not RCE** (I did not find one and do not claim one). Audited at commit `da7f719a6bab9829d520b5838e13ea7b1f9be3ef`, module `broker/`.\n\n## What a connecting client can do\n\n1. (Critical) Bypass `pattern`-based ACLs across tenants. In `AuthorizationsCollector.canDoOperation` (AuthorizationsCollector.java:116-131, esp. line 123) the clientId/username is substituted raw into a pattern ACL rule and then wildcard-matched, and the clientId is never validated for MQTT wildcard characters +/# at CONNECT (MQTTConnection.processConnect):\n\nTopic substitutedTopic = new Topic(auth.topic.toString().replace(\"%c\", client).replace(\"%u\", username));\nif (topic.match(substitutedTopic)) return true;\n\nA client that connects with clientId + turns sensor/%c/# into the filter sensor/+/#, gaining cross-tenant read AND write. (Precondition: pattern ACL rules configured — a common multi-tenant setup.)\n\n2. (High) Crash the whole broker. SessionEventLoop (SessionEventLoop.java:40-54) catches only InterruptedException and is never restarted (SessionEventLoopGroup), so any uncaught exception on it wedges every co-located client. Trivially reachable inputs: malformed $share/grp SUBSCRIBE (SharedSubscriptionUtils.extractShareName -> StringIndexOutOfBoundsException), deeply nested topic (CTrie recursion -> StackOverflowError), and ACL NPE below. Unbounded subscriptions / retained / in-flight / topic-alias / interceptor state (BrokerInterceptor uses an unbounded queue) also allow OOM; durable stores allow disk exhaustion.\n\n3. (High) NPE in ACL sink on clientId # (invalid filter sensor/#/# -> null tokens -> Topic.match NPE at Topic.java:173).\n\n4. (High) Will-message authorization bypass. Last-Will topic is published (PostOffice.publishWill) without canWrite/reserved-topic checks used for normal PUBLISH.\n\n5. (Medium) Cross-session durable corruption. H2PersistentQueue opens queue_\"+clientId and queue_\"+clientId+\"_meta; client id sensor_meta collides with victim sensor metadata map -> corrupts head/tail.\n\n6. (Medium) Fail-open if authenticator/authorizator class fails to load -> PermitAll/AcceptAll (Server.java:483-531).\n\n## Proof of concept\n\nSource-only, no network; PoCs run on JDK 17:\n- PoCPatternAcl — clientId + gains cross-tenant read/write; clientId # triggers NPE\n- PoCSharedSubCrash — extractShareName(\"$share/grp\") throws StringIndexOutOfBoundsException\n- PoCMapCollision — H2 MVStore collision overwrites victim metadata pointer\n\n## Impact\n\nCross-tenant eavesdropping and injection, whole-broker DoS, unauthorized Will publishes, and cross-session durable corruption.\n\n## Remediation\n\n1. Reject clientId/username containing +/# (and / if structural) at CONNECT; expand %c/%u as literal tokens.\n2. Harden SessionEventLoop (catch Throwable + restart supervision) and validate $share filters.\n3. Apply authorization to Will publishes like normal PUBLISH.\n4. Add resource caps (connections, queues, retained, aliases, interceptor queue) + bounded session expiry.\n5. Separate H2 namespaces and fail closed on auth-class load failure.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.moquette:moquette-broker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.18.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.18.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/security/advisories/GHSA-5f42-97gr-vfhq"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/pull/957"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/pull/958"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/pull/959"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/14a2f4fd280c8f6a791600c306cbccecb7c67007"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/26498631e92d50440b4e3ed42fa546253cc4090c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/72d6c8257191d2e4b2e3aa11ab25fd09f88c6cb7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/86feb7c31e6fac849c465d8079d08c0e7ef01cdf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/affdc71fdba92dc020421678970ae70518fb6da2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/b4a98bb3f3425ece476ed073aa080c627c1239af"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/c65b3e90fa03e562e2c2fa69c3ee916c2cbfbd2b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/ca17e0be19e86d5e291f4532dfdc94616c8e0049"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/d77753542e262b7aa573dee3c2b05e44439bbd96"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/commit/f5a323fe782d1505c0097498cb22eb6ec6c96973"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/moquette-io/moquette"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moquette-io/moquette/releases/tag/v0.18.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-23T16:11:18Z",
    "nvd_published_at" : null
  }
}