Four of the five gateway tunnel endpoints in GatewayServiceResource carry no @RolesAllowed annotation — neither on the method nor at the interface level. Any authenticated user, including one holding only read:map and no administrative role of any kind, can open a persistent, bidirectional TCP circuit from a publicly reachable SSH bastion into an edge gateway's OT/LAN segment, and can tear down tunnels that operators depend on.
The privilege requirement is inverted : merely listing a realm's tunnels requires read:admin , while creating one requires no client role at all.
Affected: every released version carrying gateway tunnelling, 1.2.0 through 1.30.1 inclusive. Fixed in 1.31.0 .
Affected versions. Gateway tunnelling was introduced on 2024-05-20 by "Initial implementation of gateway tunnelling ( #1297 )" , which predates the first tagged release ( 1.2.0 , 2024-12-18), so every release up to and including 1.30.1 carries it. Confirmed on 1.28.1 , whose tag dereferences to commit 51f4c3c0c8edd429a65237268d47d615617d4008 — the exact artifact tested.
Annotation-to-method map of model/src/main/java/org/openremote/model/gateway/GatewayServiceResource.java before the fix. The file contains exactly one @RolesAllowed , and it is on the read-only listing endpoint :
Four of the five tunnel endpoints — including both mutating ones — carry no authorization annotation.
The contrast, side by side:
The implementation's only gates are authentication, realm equality, and — for restricted users only — an asset-link check:
Nothing in that chain asks what the caller is permitted to do with tunnels, because no role is required to reach it.
The authorization gap itself was confirmed on a live instance running openremote/manager built from commit 51f4c3c0c8e (= release 1.28.1 ), with OR_DEV_MODE=false . Test user poclow held write:assets only — no admin role of any kind:
An authenticated-but-unprivileged user passes the authorization layer on the tunnel- starting endpoint while the read-only listing endpoint requires read:admin . The 400-not-403 is the evidence that authorization was not the blocker — the request failed only on business validation because the test instance had no registered gateway.
Full exploitation of the network-pivot leg requires a registered, connected gateway, which the test instance lacked. The authorization defect is independent of that and is confirmed.
Complete reproduction on a deployment with gateway federation configured:
Vulnerability class: Missing Function-Level Authorization (CWE-862).
Who is impacted: every deployment using gateway federation — i.e. any deployment actually using the feature, which is its entire purpose. The attacker needs only any authenticated account in the realm; in a multi-tenant deployment that is any customer user, including a throwaway one.
A tunnel is not a read-only fetch . It is a persistent, bidirectional TCP circuit into a private network, and the missing role gate hands that capability to accounts that were never meant to have it:
Persistent inbound pivot. doTunnelSync ( manager/src/main/java/org/openremote/manager/gateway/GatewayClientConnector.java:437 ) re-creates the forwards the central instance reports on every gateway reconnect, so a tunnel survives edge restarts until it is explicitly stopped or autoCloseTime fires — and OR_GATEWAY_TUNNEL_AUTO_CLOSE_MINUTES defaults to 0 = never ( GatewayService.java:242 ).
A TCP circuit rather than a single request. The forward is established by session.startRemotePortForwarding in MINAGatewayTunnelFactory , so it carries arbitrary TCP in both directions to the target and targetPort named in the request. What that reaches is a property of the deployment: whatever the edge gateway's JVM can route to on its own network.
Tunnel teardown DoS against tunnels administrators depend on, since stopTunnel is equally ungated.
Cross-tenant where the caller is a super user; within a realm, any user can target any gateway even without read:assets on it.
Confidentiality, integrity and availability of the network behind the gateway are therefore all in scope.
What was verified. The authorization gap was confirmed on a live instance, as set out under PoC. The consequences above follow from the code paths cited and from the documented purpose of the feature; they were not exercised end to end against a connected gateway, and no claim is made here what any particular deployment exposes on that network.
Two dedicated roles were introduced, read:tunnels and write:tunnels , and every tunnel endpoint now requires one of them: the three read endpoints require read:tunnels , and startTunnel and stopTunnel require write:tunnels . The admin roles no longer grant tunnel access, because a tunnel reaches hosts on the gateway's own network rather than anything inside the manager. Restricted users additionally see and control only the tunnels of gateway assets linked to them, and the dashboard gateway widget is gated on the same roles.
Upgrade note. A database migration adds the new roles to the read and write composite roles, so accounts holding a composite keep working. Accounts provisioned with individual roles rather than a composite do not gain them and must be granted read:tunnels or write:tunnels explicitly before they can use the tunnel endpoints again.
Testing was performed on the reporter's own disposable local infrastructure, loopback-only. Nothing was sent off-host; no third-party system was contacted. The stack and all volumes have been destroyed.
One test-harness deviation is disclosed for completeness: the openremote Keycloak client ships with directAccessGrantsEnabled=false ; it was flipped to true via the Keycloak admin API to script token acquisition. This changes how a token is obtained , not what a validly-authenticated principal may do — the authorization finding above is unaffected.
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
