Średnia

OpenRemote: Cross-realm MQTT session disconnect without authorization

  • Ujawniono: 20.11.2026
  • Aktualizacja: 20.11.2026 17:17

Summary

Cross-realm MQTT session disconnect without authorization

Vulnerability

The disconnectUserSession endpoint in UserResourceImpl.java (line 443) accepts a realm path parameter but ignores it entirely, performing no authorization or realm-boundary check before force-disconnecting an MQTT session. Any authenticated user from any realm can disconnect MQTT broker sessions belonging to users in other realms by supplying the target session ID.

File: manager/src/main/java/org/openremote/manager/security/UserResourceImpl.java, lines 443-447

java
@Override
public void disconnectUserSession(RequestParams requestParams, String realm, String sessionID) {
    if (!mqttBrokerService.disconnectSession(sessionID)) {
        throw new NotFoundException("User session not found");
    }
}

The REST interface at model/src/main/java/org/openremote/model/security/UserResource.java (line 201-204) maps this to GET {realm}/disconnect/{sessionID} with no @RolesAllowed annotation, so any authenticated user (not just admins) can call it.

Root Cause

CVE-2026-54641 (commit de89b8d) fixed cross-realm information disclosure in three read methods of the same file (get(), getUserClientRoles(), getUserRealmRoles()) and also added a realm check to getClientRoles(). The fix added throwIfCannotReadUserInRealm() and throwIfCannotAdminRealm() guards. However, disconnectUserSession was not patched and remains unprotected. Every other mutating method in this class has either a @RolesAllowed annotation on the interface or an explicit realm check in the implementation. This one has neither.

Proof of Concept

Given two realms, "master" and "building":

  1. User A authenticates in the "building" realm (any role, no admin needed).
  2. User B has an active MQTT session in the "master" realm with session ID S.
  3. User A sends: GET /api/master/user/master/disconnect/S with their building-realm bearer token.
  4. The handler ignores the realm path segments, looks up session S in the global connectionIDConnectionMap, and calls doForceDisconnect(). User B's MQTT connection is terminated.

Session IDs use the Netty ChannelId.asLongText() format (deterministic, partially sequential). While not trivially brute-forceable, IDs can leak through monitoring, logs, or correlated API calls. Within the same realm, any user (not just admins) can also disconnect sessions they should not have access to.

Impact

In a multi-tenant IoT deployment, an attacker authenticated in any realm can disrupt MQTT device connectivity in other realms. Since OpenRemote is used for building management, energy monitoring, and industrial IoT, forcibly disconnecting MQTT sessions can:

  • Knock IoT sensors and actuators offline across tenant boundaries
  • Disrupt safety-critical alarm monitoring (compounding the alarm IDOR fixed in CVE-2026-57168)
  • Cause denial of service against other tenants' device fleets

The method also uses HTTP GET for a destructive operation, making it susceptible to CSRF via image tags or link prefetch.

Suggested Fix

Add a realm administration check consistent with the pattern used elsewhere in this file:

java
@Override
public void disconnectUserSession(RequestParams requestParams, String realm, String sessionID) {
    throwIfCannotAdminRealm(realm);

    RemotingConnection connection = mqttBrokerService.getConnectionByID(sessionID);
    if (connection == null) {
        throw new NotFoundException("User session not found");
    }

    // Verify the session belongs to a user in the requested realm
    // before disconnecting

    if (!mqttBrokerService.disconnectSession(sessionID)) {
        throw new NotFoundException("User session not found");
    }
}

At minimum, add throwIfCannotAdminRealm(realm) as the first line, and consider adding a @RolesAllowed(Constants.WRITE_ADMIN_ROLE) annotation to the interface method. The HTTP method should also be changed from GET to DELETE.

AI tooling

AI assistance was used for the code audit and for drafting this report. The finding against the project's source at the location cited above was manually verified before reporting it, and the severity and impact assessment are the reporter's own.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Java / Kotlin (Maven) io.openremote:openremote-manager < 1.31.0 1.31.0

Odnośniki

Ocena CVSS -
Wektor CVSS
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
Słabość (CWE)
CWE-862
Platforma
Java / Kotlin (Maven)
Paczka
io.openremote:openremote-manager
Ujawniono
20.11.2026
Aktualizacja
20.11.2026 17:17

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-3h6w-xcw3-9xjj - CC BY 4.0

Historia podatności: io.openremote:openremote-manager

Wszystkie opisane podatności tej paczki (Java / Kotlin (Maven)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkich wpisów
8
Pierwsza → ostatnia
04.2026 11.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 2
  • Wysoka 4
  • Średnia 2

Ujawnienia w latach

  1. 2026: 8
  1. OpenRemote: Cross-realm MQTT session disconnect without authorization ten wpis
    Średnia CVE-2026-104885 < 1.31.0 1.31.0
  2. Średnia · 4.3 CVE-2026-49439 < 1.24.1 1.24.1
  3. Krytyczna · 9.6 CVE-2026-56120 < 1.25.0 1.25.0
  4. Wysoka · 7.6 CVE-2026-40882 < 1.22.0 1.22.0
  5. Krytyczna · 9.9 CVE-2026-39842 < 1.22.0 1.22.0

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.