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 3 hours ago•CVE-2026-9639
6.5

CVE-2026-9639: Authenticated Denial of Service via Nil-Pointer Dereference in Canonical LXD Custom Volume Backup Import

CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.

Amit Schendel
Amit Schendel
5 views•9 min read
•about 4 hours ago•CVE-2026-33050
8.8

CVE-2026-33050: OS Command Injection in GeoNode Vector Upload Handler

An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.

Alon Barad
Alon Barad
5 views•9 min read
•about 5 hours ago•CVE-2026-46429
5.5

CVE-2026-46429: Unrestricted File Upload and Validation Bypass in GeoNode

GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 6 hours ago•CVE-2026-55649
6.3

CVE-2026-55649: Stored Cross-Site Scripting in GeoNode Document Metadata Abstract Field

CVE-2026-55649 is a stored Cross-Site Scripting (XSS) vulnerability in GeoNode versions prior to 5.0.3. The flaw exists because document abstract metadata fields are ingested via the metadata management pipeline and stored in the backend database without HTML sanitization or input neutralization. An authenticated attacker with privileges to create or edit document metadata can inject arbitrary HTML and JavaScript payloads into these fields. When another user, such as an administrator, views the affected document page or catalog listing, the unencoded payload is rendered into the Document Object Model (DOM) and executes within the victim's browser session.

Amit Schendel
Amit Schendel
7 views•9 min read
•about 7 hours ago•GHSA-QX75-2P3R-PWM5
7.7

CVE-2026-55622: Cross-Project Instance Copy Authorization Bypass in Canonical LXD and LXC Incus

CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.

Amit Schendel
Amit Schendel
6 views•11 min read
•about 8 hours ago•GHSA-7MR3-28H5-M5VX
7.7

GHSA-7mr3-28h5-m5vx: Authorization Bypass and Cross-Project Volume Copy in Canonical LXD

An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.

Alon Barad
Alon Barad
5 views•10 min read