Alta

OpenRemote has Improper Access Control via updateUserRealmRoles function

  • Publicada: 22.04.2026
  • Actualizado: 11.10.2026 12:22

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.

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

  1. Create a new Keycloak realm other than master. Add a user and grant that user the OpenRemote client role write:admin. Remember the realm name (call it NEW_REALM).
  2. In Keycloak realm master, pick a low-privilege user (no admin realm role). Copy that user’s UUID (<master-user-uuid>).
  3. Authenticate as the user from step 1 and obtain a Bearer access token (<token>) for NEW_REALM.
  4. Replace placeholders and run:
bash
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"]'
  1. 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.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Java / Kotlin (Maven) io.openremote:openremote-manager < 1.22.1 1.22.1

Referencias

Puntuación CVSS 7/10
Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L
Debilidad (CWE)
CWE-284
Plataforma
Java / Kotlin (Maven)
Paquete
io.openremote:openremote-manager
Publicada
22.04.2026
Actualizado
11.10.2026 12:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-49vv-25qx-mg44 - CC BY 4.0

Historial de vulnerabilidades: io.openremote:openremote-manager

Todas las vulnerabilidades publicadas de este paquete (Java / Kotlin (Maven)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Entradas en total
7
Primera → última
04.2026 07.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Crítica 2
  • Alta 4
  • Media 1

Divulgaciones por año

  1. 2026: 7
  1. Media · 4.3 CVE-2026-49439 < 1.24.1 1.24.1
  2. Crítica · 9.6 CVE-2026-56120 < 1.25.0 1.25.0
  3. OpenRemote has Improper Access Control via updateUserRealmRoles function esta entrada
    Alta · 7.0 CVE-2026-41166 < 1.22.1 1.22.1
  4. Alta · 7.6 CVE-2026-40882 < 1.22.0 1.22.0
  5. Crítica · 9.9 CVE-2026-39842 < 1.22.0 1.22.0

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.