GHSA-3H6W-XCW3-9XJJ

Vulnerability from github – Published: 2026-11-20 14:56 – Updated: 2026-11-20 14:56
VLAI
Summary
OpenRemote: Cross-realm MQTT session disconnect without authorization
Details

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

@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:

@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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "io.openremote:openremote-manager"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.31.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-104885"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-862"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-20T14:56:58Z",
    "nvd_published_at": "2026-11-19T20:17:14Z",
    "severity": "MODERATE"
  },
  "details": "### Summary\n\nCross-realm MQTT session disconnect without authorization\n\n## Vulnerability\n\nThe `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.\n\nFile: `manager/src/main/java/org/openremote/manager/security/UserResourceImpl.java`, lines 443-447\n\n```java\n@Override\npublic void disconnectUserSession(RequestParams requestParams, String realm, String sessionID) {\n    if (!mqttBrokerService.disconnectSession(sessionID)) {\n        throw new NotFoundException(\"User session not found\");\n    }\n}\n```\n\nThe 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.\n\n## Root Cause\n\nCVE-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.\n\n## Proof of Concept\n\nGiven two realms, \"master\" and \"building\":\n\n1. User A authenticates in the \"building\" realm (any role, no admin needed).\n2. User B has an active MQTT session in the \"master\" realm with session ID `S`.\n3. User A sends: `GET /api/master/user/master/disconnect/S` with their building-realm bearer token.\n4. The handler ignores the realm path segments, looks up session `S` in the global `connectionIDConnectionMap`, and calls `doForceDisconnect()`. User B\u0027s MQTT connection is terminated.\n\nSession 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.\n\n## Impact\n\nIn 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:\n\n- Knock IoT sensors and actuators offline across tenant boundaries\n- Disrupt safety-critical alarm monitoring (compounding the alarm IDOR fixed in CVE-2026-57168)\n- Cause denial of service against other tenants\u0027 device fleets\n\nThe method also uses HTTP GET for a destructive operation, making it susceptible to CSRF via image tags or link prefetch.\n\n## Suggested Fix\n\nAdd a realm administration check consistent with the pattern used elsewhere in this file:\n\n```java\n@Override\npublic void disconnectUserSession(RequestParams requestParams, String realm, String sessionID) {\n    throwIfCannotAdminRealm(realm);\n\n    RemotingConnection connection = mqttBrokerService.getConnectionByID(sessionID);\n    if (connection == null) {\n        throw new NotFoundException(\"User session not found\");\n    }\n\n    // Verify the session belongs to a user in the requested realm\n    // before disconnecting\n\n    if (!mqttBrokerService.disconnectSession(sessionID)) {\n        throw new NotFoundException(\"User session not found\");\n    }\n}\n```\n\nAt 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.\n\n### AI tooling\n\nAI assistance was used for the code audit and for drafting this report. The finding against the project\u0027s source at the location cited above was manually verified before reporting it, and the severity and impact assessment are the reporter\u0027s own.",
  "id": "GHSA-3h6w-xcw3-9xjj",
  "modified": "2026-11-20T14:56:58Z",
  "published": "2026-11-20T14:56:58Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/openremote/core/security/advisories/GHSA-3h6w-xcw3-9xjj"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-104885"
    },
    {
      "type": "WEB",
      "url": "https://github.com/openremote/core/commit/51dce18d9e00d671a5e032d942ece186bdada560"
    },
    {
      "type": "WEB",
      "url": "https://github.com/openremote/core/releases/tag/1.31.0"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/openremote/openremote"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "OpenRemote: Cross-realm MQTT session disconnect without authorization"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…