CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-85724

CVE-2026-85724: Pattern-ACL Wildcard Injection & Cross-Tenant Authorization Bypass in Moquette MQTT Broker

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 23, 2026·7 min read·18 visits

Executive Summary (TL;DR)

A critical flaw in Moquette versions < 0.18.1 allows remote clients to inject MQTT wildcards into their Client ID or username, bypassing pattern-based ACLs for cross-tenant topic access, or triggering a NullPointerException that silences the shared event loop and crashes the broker's session handling.

CVE-2026-85724 is a critical vulnerability in the Moquette MQTT broker (versions prior to 0.18.1) where unvalidated substitution of client identifiers and usernames into pattern-based Access Control Lists (ACLs) permits remote authenticated attackers to bypass multi-tenant boundaries and trigger a Denial of Service.

Vulnerability Overview

Moquette is a lightweight, Java-based MQTT broker widely deployed in industrial internet-of-things (IIoT) architectures, embedded software applications, and microservice backends. To support multitenancy, Moquette implements a pattern-based Access Control List (ACL) system. This system allows administrators to define dynamic topic templates where placeholders like %c and %u are dynamically replaced by the client ID and username of the active session. This mechanism is designed to isolate tenants within their respective logical namespaces, ensuring that a client can only publish or subscribe to topics specifically registered to their identity.

The attack surface for this vulnerability is exposed during the client connection processing and topic validation phases. The root issue belongs to the CWE-863 (Incorrect Authorization) and CWE-155 (Improper Neutralization of Wildcards or Matching Symbols) categories. Because the broker did not sanitize or inspect the provided connection parameters before performing string replacement, a low-privilege remote client could intentionally inject MQTT wildcard characters into its identity fields.

Exploitation of this vulnerability results in a total breakdown of multi-tenant isolation. Attackers can gain complete read and write access to unauthorized namespaces, enabling them to harvest sensitive data or publish malicious control messages. Additionally, crafted identities can trigger a secondary crash vector inside the session processing thread, leading to a persistent Denial of Service (DoS) for all clients sharing the affected event loop.

Root Cause Analysis

The vulnerability resides in the core authorization evaluation pipeline located inside io.moquette.broker.security.AuthorizationsCollector.java within the canDoOperation method. When a client requests access to an MQTT topic, the broker iterates over the parsed pattern-based authorization configurations. For each configuration, the broker calls a string substitution routine to construct the compiled target topic filter. The template replacement statement is implemented as follows:

Topic substitutedTopic = new Topic(auth.topic.toString().replace("%c", client).replace("%u", username));

This implementation operates on the assumption that client IDs and usernames are safe, pre-validated string literals. In standard MQTT environments, however, the characters + (single-level wildcard) and # (multi-level wildcard) possess specific semantic matching capabilities. The broker failed to execute any escaping, sanitization, or syntactic restriction on the incoming client and username variables before applying this replacement.

When a client connects with a wildcard string like + as its client ID, the placeholder %c in a rule like sensor/%c/# is substituted directly. This transforms the restricted rule into sensor/+/#. The resulting compiled filter allows the connection to match any topic structure matching the pattern, breaching the intended isolation boundaries. If an attacker injects a multi-level wildcard #, the pattern expands to sensor/#/#. Under the MQTT protocol specification, a multi-level wildcard must be terminal. Parsing this invalid structure yields empty internal tokens inside the constructed Topic instance, leading to subsequent fatal runtime failures.

Code Analysis & Patch Walkthrough

The vulnerability was mitigated in version 0.18.1 across several focused patches. In the initial vulnerable version, AuthorizationsCollector.java processed the replacement blindly. The fix implemented in commit b4a98bb3f3425ece476ed073aa080c627c1239af introduces strict pattern validation before executing the template substitution:

// Introduced helper method to detect injected wildcards
private static boolean hasTopicWildcard(String identity) {
    return identity != null && (identity.indexOf('+') >= 0 || identity.indexOf('#') >= 0);
}

Within the authorization block, the code now checks both connection parameters before allowing substitution. If wildcards are present, the broker logs a security warning and bypasses the evaluation block entirely, causing the authorization logic to fail closed:

if (isNotEmpty(client) || isNotEmpty(username)) {
    if (hasTopicWildcard(client) || hasTopicWildcard(username)) {
        LOG.warn("Skipping pattern ACL matching: the client id or username contains MQTT topic " +
            "wildcards ('+' or '#') and can't be safely substituted into a pattern filter " +
            "(client: {}, username: {})", client, username);
    } else {
        // Original substitution path executing only on sanitized parameters
        for (Authorization auth : m_patternAuthorizations) {
            Topic substitutedTopic = new Topic(auth.topic.toString().replace("%c", client).replace("%u", username));
            if (auth.grant(permission)) {
                if (topic.match(substitutedTopic)) {
                    return true;
                } 
            }
        }
    }
}

A secondary flaw addressed in commit ffd921523d66740c1a4e35918891dd4ced227769 targets anonymous connections. If a client connects without authentication, the username parameter resolves to a Java null. Calling .replace("%u", username) on a null variable throws a NullPointerException. The patch safely normalizes these inputs prior to string operations:

final String clientValue = client == null ? "" : client;
final String usernameValue = username == null ? "" : username;

Exploitation Methodology

To exploit the authorization bypass vector, an attacker must establish a standard MQTT connection to the broker. This requires low-privilege client credentials or access to an anonymous port if permitted by the broker's configuration. The target system must also have pattern-based ACL rules active, such as tenant/%c/telemetry.

The attacker initiates a connection using the client ID +. Once the connection is accepted, the attacker issues a subscription request to the broad wildcard path tenant/+/telemetry. When the broker processes this subscription request, it evaluates the pattern rule. The substitution converts tenant/%c/telemetry to tenant/+/telemetry. Because the substituted pattern is identical to the target subscription path, the broker validates the request, granting the attacker read access to all telemetry messages generated across all tenant namespaces.

The vulnerability is highly reproducible. Security researchers can verify this behavior utilizing standard test suites or command-line MQTT utilities. By passing a wildcard identity during the connection phase, an attacker can confirm whether they receive data originating from other isolated test channels.

Denial of Service Vector

The secondary exploitation vector targets broker availability. If an attacker initiates a connection with the client ID set to #, the pattern substitution outputs tenant/#/#. When the broker attempts to parse this malformed path inside the Topic parser, it constructs a flawed topic object with no valid internal tokens.

When the system subsequently executes topic.match(substitutedTopic) to compare the client's request against the ACL, the method fails internally. The execution of Topic.match() crashes with an unhandled NullPointerException (NPE). In Moquette versions prior to 0.18.1, these exceptions were handled poorly by the underlying thread infrastructure.

The executing context for these sessions is managed by SessionEventLoop.java. The event loop only caught InterruptedException. When the unhandled NullPointerException occurred, it propagated directly to the top-level handler, silently terminating the shared event loop thread. Because Moquette multiplexes multiple active client sessions across a limited thread pool, killing one of these loop threads wedges all co-located sessions, leading to a complete and persistent Denial of Service.

Remediation & Defense-in-Depth

Remediation requires upgrading the Moquette broker to version 0.18.1 or newer. This update integrates the necessary wildcard parameter validation inside AuthorizationsCollector.java and incorporates robust exception containment inside SessionEventLoop.java (via commit 86feb7c31e6fac849c465d8079d08c0e7ef01cdf). The thread execution path is now protected by a generic Throwable catch block, preventing runtime errors from killing the shared loops.

If upgrading the dependency is not immediately feasible, administrators can apply several defense-in-depth mitigations. First, configure the broker or an upstream load balancer to reject client identifiers containing the characters + or # during the connection phase. Second, disable pattern-based ACLs in configurations where tenant separation is strictly required, opting instead for explicit static rules mapped per authenticated user.

Monitoring and detection can be configured by auditing the broker's logs. The patched version of Moquette explicitly logs skipped pattern evaluations. System administrators should configure alerting rules for log lines matching: Skipping pattern ACL matching: the client id or username contains MQTT topic wildcards. The appearance of this warning is a strong indicator of either a misconfigured client or an active exploitation attempt.

Official Patches

moquette-ioPattern ACL Wildcard Injection Patch
moquette-ioGuard for Null Username Reference
moquette-ioContainment of Command/Thread Processing Exceptions

Fix Analysis (3)

Technical Appendix

CVSS Score
9.6/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N

Affected Systems

Moquette MQTT Broker versions prior to 0.18.1

Affected Versions Detail

Product
Affected Versions
Fixed Version
Moquette
moquette-io
< 0.18.10.18.1
AttributeDetail
CWE IDCWE-863, CWE-155
Attack VectorNetwork (Unauthenticated or Low-Privilege Remote)
CVSS v3.1 Score9.6 (Critical)
EPSS ScoreN/A
ImpactCross-Tenant Authorization Bypass & Denial of Service
Exploit StatusProof of Concept / Code-Level Analysis
KEV StatusNot Listed in CISA KEV Catalog

MITRE ATT&CK Mapping

T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-863
Incorrect Authorization

The software performs authorization checks but fails to prevent a user from gaining unauthorized access via malicious client configurations.

Vulnerability Timeline

Technical fix committed to pattern ACL wildcard evaluation
2026-07-11
Follow-up fix committed to secure pattern substitution against null usernames
2026-07-19
Moquette version 0.18.1 released
2026-08-01
GitHub Security Advisory and CVE-2026-85724 published
2026-09-23

References & Sources

  • [1]GitHub Security Advisory GHSA-5f42-97gr-vfhq
  • [2]Official Release v0.18.1
  • [3]CVE Registry Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-16454
4.3

CVE-2026-16454: Object-Level Authorization Bypass in Eclipse hawkBit Direct Device Integration Controller

CVE-2026-16454 is an object-level authorization bypass vulnerability (CWE-284, CWE-862) in Eclipse hawkBit versions 1.0.3 and prior. The flaw exists within the Direct Device Integration (DDI) REST controller (hawkbit-ddi-resource), where endpoints responsible for enumerating software module metadata and serving firmware binaries fail to verify whether the requested software module is assigned to the authenticated device. Consequently, any device with valid credentials (such as a TargetToken or GatewayToken) can enumerate software module identifiers and download arbitrary firmware artifacts across the entire tenant namespace.

Amit Schendel
Amit Schendel
2 views•9 min read
•about 2 hours ago•CVE-2026-62284
8.6

CVE-2026-62284: Remote Code Execution and SSRF via Unsanitized Kubeconfig in OSAC Operator

CVE-2026-62284 (GHSA-5w5g-j6hw-6p8f) is a code injection and server-side request forgery vulnerability in the console-proxy component of the OSAC Operator. The RemoteConfigResolver parses Kubernetes Secrets containing kubeconfig files via clientcmd.RESTConfigFromKubeConfig without sanitizing execution-related fields. An attacker with RBAC permissions to create or modify labeled Secrets in monitored namespaces can supply a malicious exec credential plugin, resulting in arbitrary command execution within the console-proxy pod.

Amit Schendel
Amit Schendel
3 views•8 min read
•about 3 hours ago•CVE-2026-62361
5.5

CVE-2026-62361: Authenticated SQL Injection and Table Access Control Bypass in Listmonk Subscriber Export

CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).

Alon Barad
Alon Barad
4 views•11 min read
•about 4 hours ago•CVE-2026-28385
5.0

CVE-2026-28385: Server-Side Request Forgery in Canonical LXD Image Import

CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.

Amit Schendel
Amit Schendel
7 views•9 min read
•about 5 hours ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
6 views•12 min read
•about 6 hours ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
5 views•9 min read