{"schema":"threatline.record/2","record":{"id":"CVE-2026-85724","aliases":["CVE-2026-95842","CVE-2026-95843","CVE-2026-95844","CVE-2026-95845","CVE-2026-95846","CVE-2026-95847","CVE-2026-95848","GHSA-5f42-97gr-vfhq"],"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.","categories":["Libraries & packages"],"product":"io.moquette:moquette-broker","vendor":"moquette-io","ecosystem":"maven","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-5f42-97gr-vfhq","source_modified_at":"2026-10-19T19:25:31Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"maven","name":"io.moquette:moquette-broker"},"range":"<= 0.18.0"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-85724","source_modified_at":"2026-09-24T14:19:04.429Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"moquette","vendor":"moquette-io","versions":[{"status":"affected","version":"< 0.18.1"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-5f42-97gr-vfhq","source_modified_at":"2026-10-19T19:30:12.063094642Z","fetched_at":"2026-10-23T18:48:36.087640Z","package":{"name":"io.moquette:moquette-broker","ecosystem":"Maven","purl":"pkg:maven/io.moquette/moquette-broker"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.18.1"}]}],"versions":["0.15","0.16","0.17"]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-5f42-97gr-vfhq","source_modified_at":"2026-10-19T19:25:31Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"maven","name":"io.moquette:moquette-broker"},"version":"0.18.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-5f42-97gr-vfhq","source_modified_at":"2026-10-19T19:30:12.063094642Z","fetched_at":"2026-10-23T18:48:36.087640Z","package":{"name":"io.moquette:moquette-broker","ecosystem":"Maven","purl":"pkg:maven/io.moquette/moquette-broker"},"version":"0.18.1"}],"cvss":9.6,"severity":"Critical","kev":{"listed":false},"epss":{"probability":0.0027,"percentile":0.18226,"score_date":"2026-10-23"},"published_at":"2026-09-23T16:29:36.296Z","modified_at":"2026-10-19T19:30:12.063094642Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-5f42-97gr-vfhq","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-19T19:25:31Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-85724","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-09-24T14:19:04.429Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-5f42-97gr-vfhq","fetched_at":"2026-10-23T18:48:36.087640Z","source_modified_at":"2026-10-19T19:30:12.063094642Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-85724","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/moquette-io/moquette/security/advisories/GHSA-5f42-97gr-vfhq","tags":["exploit"]},{"url":"https://github.com/moquette-io/moquette/pull/957","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/pull/958","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/pull/959","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/commit/14a2f4fd280c8f6a791600c306cbccecb7c67007","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/commit/26498631e92d50440b4e3ed42fa546253cc4090c","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/commit/72d6c8257191d2e4b2e3aa11ab25fd09f88c6cb7","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/commit/86feb7c31e6fac849c465d8079d08c0e7ef01cdf","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/commit/affdc71fdba92dc020421678970ae70518fb6da2","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/moquette-io/moquette/commit/b4a98bb3f3425ece476ed073aa080c627c1239af","tags":["x_refsource_MISC"]},{"url":"https://github.com/moquette-io/moquette/commit/c65b3e90fa03e562e2c2fa69c3ee916c2cbfbd2b","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/commit/ca17e0be19e86d5e291f4532dfdc94616c8e0049","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/commit/d77753542e262b7aa573dee3c2b05e44439bbd96","source":"GitHub Advisory Database"},{"url":"https://github.com/moquette-io/moquette/commit/f5a323fe782d1505c0097498cb22eb6ec6c96973","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/moquette-io/moquette/releases/tag/v0.18.1","tags":["x_refsource_MISC"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-85724","source":"GitHub Advisory Database"},{"url":"https://github.com/advisories/GHSA-5f42-97gr-vfhq","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"poc","automatable":"no","technical_impact":"total","assessed_at":"2026-09-24T14:18:56.863679Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-19T19:30:12.063094642Z","content_hash":"662f72c8a1c938272fbde30aa504c599505c104ff7399348623fdd5b4e58e38f"}}
