GHSA-5F42-97GR-VFHQ

Vulnerability from github – Published: 2026-09-23 16:11 – Updated: 2026-09-23 16:11
VLAI
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/.

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.)

  1. (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.

  2. (High) NPE in ACL sink on clientId # (invalid filter sensor/#/# -> null tokens -> Topic.match NPE at Topic.java:173).

  3. (High) Will-message authorization bypass. Last-Will topic is published (PostOffice.publishWill) without canWrite/reserved-topic checks used for normal PUBLISH.

  4. (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.

  5. (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.
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.18.0"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "io.moquette:moquette-broker"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.18.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-85724"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": true,
    "github_reviewed_at": "2026-09-23T16:11:18Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "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 \u2014 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 -\u003e StringIndexOutOfBoundsException), deeply nested topic (CTrie recursion -\u003e 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/#/# -\u003e null tokens -\u003e 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 -\u003e corrupts head/tail.\n\n6. (Medium) Fail-open if authenticator/authorizator class fails to load -\u003e PermitAll/AcceptAll (Server.java:483-531).\n\n## Proof of concept\n\nSource-only, no network; PoCs run on JDK 17:\n- PoCPatternAcl \u2014 clientId + gains cross-tenant read/write; clientId # triggers NPE\n- PoCSharedSubCrash \u2014 extractShareName(\"$share/grp\") throws StringIndexOutOfBoundsException\n- PoCMapCollision \u2014 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.",
  "id": "GHSA-5f42-97gr-vfhq",
  "modified": "2026-09-23T16:11:18Z",
  "published": "2026-09-23T16:11:18Z",
  "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"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "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"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…