OpenClaw Gateway RCE and Privilege Escalation via Device Pairing Approval
A critical vulnerability in OpenClaw versions prior to 2026.3.22 allows for remote code execution and privilege escalation by permitting an operator.pairing approver to approve device requests with broader operator scopes than authorized, potentially leading to unauthorized administrative access.
Triage facts
Revision 2- Evidence
- Unknown
- Severity
- Critical
- Sources
- 1 public source
- Freshness
- Revision 2Mar 26, 21:46 UTC
- Detection
- 2 rules
Revision history 1 entry · Revision 2
- Revision 2
Repaired a legacy canonical identity collision
Changed: slug
OpenClaw versions prior to 2026.3.22 contain a critical vulnerability that allows for remote code execution (RCE) and privilege escalation. Specifically, the device.pair.approve function within the OpenClaw gateway does not properly validate the scopes requested during device pairing. This flaw enables an attacker with operator.pairing privileges to approve device requests for scopes exceeding their own, potentially escalating their privileges to operator.admin. The vulnerability was reported by @zpbrent and patched in version 2026.3.22, with the fix present in subsequent releases (v2026.3.23 and v2026.3.23-2). Defenders should upgrade vulnerable instances immediately. The affected package is npm/openclaw.
Attack Chain
- An attacker gains initial access with
operator.pairingprivileges. - The attacker initiates a device pairing request, specifying a broader scope such as
operator.admin. - The vulnerable
device.pair.approvefunction, lacking proper scope validation, approves the device pairing request. - The newly paired device now possesses the elevated
operator.adminprivileges. - The attacker leverages the escalated privileges to execute administrative functions, potentially including modifying system configurations or accessing sensitive data.
- The attacker deploys malicious code or alters existing code through the compromised administrative access.
- The system executes the attacker's malicious code, leading to remote code execution.
- The attacker maintains persistent access and control over the OpenClaw gateway.
Impact
Successful exploitation of this vulnerability allows attackers to escalate privileges from operator.pairing to operator.admin on OpenClaw gateways. This privilege escalation can lead to unauthorized access to sensitive data, modification of system configurations, and remote code execution, potentially compromising the entire OpenClaw environment. Given the critical nature of gateways in controlling access and data flow, this vulnerability could result in significant data breaches and system downtime. The impact is especially severe in environments where OpenClaw manages critical infrastructure or sensitive data.
Recommendation
- Upgrade all OpenClaw installations to version 2026.3.22 or later to patch the vulnerability (reference: Affected Packages / Versions).
- Deploy the Sigma rule
Detect Suspicious Device Pairing Approvalto monitor for unauthorized scope escalation attempts (reference: rules). - Review and audit existing device pairing configurations to identify any instances where devices may have been granted excessive privileges due to this vulnerability.
- Monitor gateway logs for unusual administrative activity originating from recently paired devices (reference: Sigma rule
Detect Admin Activity from Newly Paired Device).
Detection coverage 2
Detect Suspicious Device Pairing Approval
highDetects attempts to approve device pairing requests with escalated privileges by monitoring for device pairing events where the requested scope exceeds the approver's scope.
Detect Admin Activity from Newly Paired Device
mediumDetects unusual administrative activity originating from devices that were recently paired, potentially indicating exploitation of the privilege escalation vulnerability.
Detection queries are available on the platform. Get full rules →