Dev.to Security 🔐 Cybersecurity 👁 0 📖 3 min read

CVE-2026-104885: CVE-2026-104885: Cross-Realm MQTT Session Disconnect via Missing Authorization in OpenRemote

CVE-2026-104885: Cross-Realm MQTT Session Disconnect via Missing Authorization in OpenRemote Vulnerability ID: CVE-2026-104885 CVSS Score: 6.3 Published: 2026-11-20 OpenRemote prior to version 1.31.0 contains a Miss

CVE-2026-104885: Cross-Realm MQTT Session Disconnect via Missing Authorization in OpenRemote

Vulnerability ID: CVE-2026-104885
CVSS Score: 6.3
Published: 2026-11-20

OpenRemote prior to version 1.31.0 contains a Missing Authorization vulnerability (CWE-862) in the user management REST API endpoint responsible for disconnecting active MQTT sessions. The disconnectUserSession method in UserResourceImpl fails to verify whether the requesting user owns the target MQTT session, holds administrative privileges, or belongs to the realm specified in the request path. As a result, any authenticated user who obtains a valid MQTT session identifier can forcefully terminate active MQTT connections belonging to other users or IoT devices across any tenant realm.

TL;DR

An authenticated user in OpenRemote (< 1.31.0) can terminate arbitrary MQTT sessions across any realm via the GET /{realm}/disconnect/{sessionID} endpoint due to a complete absence of session ownership, role, and realm validation checks.

Technical Details

  • CVE / GHSA ID: CVE-2026-104885 / GHSA-3h6w-xcw3-9xjj
  • Weakness Class: CWE-862: Missing Authorization (BOLA / IDOR)
  • CVSS v4.0 Score: 6.3 Medium (CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N)
  • EPSS Score: 0.32% (25.75th Percentile)
  • Affected Component: UserResourceImpl.disconnectUserSession (GET /{realm}/disconnect/{sessionID})
  • Impact: Unauthorized cross-realm and horizontal termination of active MQTT sessions
  • Patched Version: OpenRemote Core 1.31.0
  • CISA KEV / Exploit Status: Not Listed in KEV / No public weaponized exploits

Affected Systems

  • OpenRemote Core (openremote/core) < 1.31.0
  • OpenRemote Core: < 1.31.0 (Fixed in: 1.31.0)

Code Analysis

Commit: 51dce18

Enforce realm validation, session ownership, and write:admin role checks when disconnecting MQTT user sessions, and ensure realm active status checks across UserResourceImpl.

File: manager/src/main/java/org/openremote/manager/mqtt/MQTTBrokerService.java
@@ -610,6 +610,11 @@ public Set<RemotingConnection> getUserConnections(String userID) {
         .collect(Collectors.toSet());
   }

+  public String getConnectionUserId(String connectionID) {
+    RemotingConnection connection = connectionIDConnectionMap.get(connectionID);
+    return connection == null ? null : IdentityProvider.getSubjectId(connection.getSubject());
+  }
+
   protected void doForceDisconnect(RemotingConnection connection) {
     LOG.log(
         DEBUG, () -> "Force disconnecting client connection: " + connectionToString(connection));

File: manager/src/main/java/org/openremote/manager/security/UserResourceImpl.java
@@ -459,6 +464,35 @@ public UserSession[] getUserSessions(RequestParams requestParams, String realm,

   @Override
   public void disconnectUserSession(RequestParams requestParams, String realm, String sessionID) {
+    String connectionUserId = mqttBrokerService.getConnectionUserId(sessionID);
+    if (connectionUserId == null) {
+      throw new NotFoundException("User session not found");
+    }
+
+    User connectionUser = identityService.getIdentityProvider().getUser(connectionUserId);
+    if (connectionUser == null) {
+      throw new NotFoundException("User not found");
+    }
+
+    String connectionRealm = connectionUser.getRealm();
+
+    if (!connectionRealm.equals(realm)) {
+      throw new NotFoundException("User session not found in realm");
+    }
+
+    throwIfCannotReadUserInRealm(connectionRealm, connectionUserId);
+
+    boolean hasAdminWriteRole =
+        hasResourceRoleOrIsSuperUser(
+            ClientRole.WRITE_ADMIN.getValue(), Constants.KEYCLOAK_CLIENT_ID);
+
+    if (!hasAdminWriteRole && !Objects.equals(getUserId(), connectionUserId)) {
+      throw new ForbiddenException(
+          "Can only disconnect own user sessions unless you have role '"
+              + ClientRole.WRITE_ADMIN
+              + "'");
+    }
+
     if (!mqttBrokerService.disconnectSession(sessionID)) {
       throw new NotFoundException("User session not found");
     }

Mitigation Strategies

  • Upgrade OpenRemote Core to version 1.31.0 or later to enforce realm boundaries, session ownership, and administrative role checks.
  • Deploy reverse proxy or Web Application Firewall (WAF) rules to block or IP-restrict requests matching the /user/{realm}/disconnect/{sessionID} URI pattern until patching is complete.
  • Audit logging pipelines and monitoring endpoints to prevent leakage of active Netty/MQTT session identifiers to low-privileged users.

Remediation Steps:

  1. Identify all deployed OpenRemote Manager instances running versions prior to 1.31.0.
  2. Update the OpenRemote Core dependency or container image to version 1.31.0 (which includes fix commits 51dce18d9e00d671a5e032d942ece186bdada560 and 9c635f76d93365fc09d004fdb5a447852fa29ed7).
  3. Verify the remediation by attempting to call GET /api/master/user/{realm}/disconnect/{sessionID} using a non-admin user token for a session owned by a different user, confirming the API returns 403 Forbidden or 404 Not Found.
  4. If immediate upgrade is not feasible, apply an NGINX, Traefik, or HAProxy path filter blocking external HTTP requests matching ^/api/.+/user/.+/disconnect/.*$.

References

Read the full report for CVE-2026-104885 on our website for more details including interactive diagrams and full exploit analysis.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.