{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:openremote:openremote:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "1.22.1"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "38b9b55a84fc3b7e582879a56c0e2c2d0d2daf53"
            }
          ],
          "repo": "https://github.com/openremote/openremote",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-49vv-25qx-mg44"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-284"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41166.json"
  },
  "details": "OpenRemote is an open-source internet-of-things platform. Prior to version 1.22.1, 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. Version 1.22.1 fixes the issue.",
  "id": "CVE-2026-41166",
  "modified": "2026-07-15T01:49:08.294858552Z",
  "published": "2026-04-22T20:31:29.234Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/openremote/openremote/releases/tag/1.22.1"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41166.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/openremote/openremote/security/advisories/GHSA-49vv-25qx-mg44"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41166"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "OpenRemote has Improper Access Control via updateUserRealmRoles function"
}