/

CVE-2026-33579

Severity:

CRITICAL RISK

(9.9)

Missing Authorization in OpenClaw Device Pair Approval Path

CVE-2026-33579

Modified

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-863

Impact:

Privilege Escalation to Administrative Scopes

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenClaw before 2026.3.28 contains a privilege escalation flaw in the /pair approve command path where the caller's authorization scopes are not forwarded into the core approval check.

As a result, a user with pairing privileges but without admin rights can approve pending device pair requests that request broader scopes, including admin access, effectively escalating their own or a device's privileges.

Affected context

This vulnerability arises in OpenClaw deployments that:

  • Use the device pairing workflow and the /pair approve command path
  • Allow users with pairing-related permissions to review and approve device access requests
  • Rely on downstream approval logic to enforce scope-based access control

The issue is specifically tied to the approval implementation in:

  • extensions/device-pair/index.ts
  • src/infra/device-pairing.ts

Exploit preconditions

  • Attack surface: Application-level command/endpoint handling device pair approvals.
  • Required access: An authenticated user account with permission to initiate or approve device pairing, but not admin privileges.
  • Trigger point: Submitting or triggering a /pair approve operation for a pending device request that asks for broader scopes (e.g., admin).
  • Why exploitation is possible: The approval logic fails to propagate the caller's scopes into the core authorization check, so the system validates only the requested device scopes (or uses a default path) instead of ensuring the approver is allowed to grant those scopes.

Why this happens

The root cause is a missing authorization check in the approval flow, aligning with CWE-863: Incorrect Authorization.

Specifically, the code in extensions/device-pair/index.ts and src/infra/device-pairing.ts does not forward the caller's effective scopes to the central approval function.

Without this contextual information, the core logic cannot compare "scopes being granted" against "scopes held by the approver," allowing users with limited pairing privileges to approve device requests that confer higher privileges, including admin-level scopes.

Conceptually, this is an authorization design flaw where the enforcement point lacks complete subject context, causing policy decisions to be made on incomplete or incorrect authorization data.

Potential impact

  • A pairing-privileged user may approve device requests that grant admin-level or other high-privilege scopes.
  • Devices can gain broader access than intended, including administrative control over OpenClaw-managed resources.
  • Escalation from a constrained operational role to effective administrator capability via compromised or over-privileged devices.
  • Potential for configuration tampering, sensitive data access, or disruption of OpenClaw-managed infrastructure.
  • Lateral movement through device-based privileges into other parts of the environment connected to OpenClaw.

General mitigation guidance

Effective mitigation centers on enforcing scope-aware authorization at the point of approval and ensuring that all policy decisions are made with complete subject context.

Common defensive patterns include:

  • Context-complete authorization checks: Ensure that the core approval function always receives the caller's identity and full scope set, and explicitly verifies that the approver is allowed to grant each requested scope.
  • Least-privilege role design: Separate "pairing" from "scope-granting" privileges so that users responsible for pairing cannot automatically approve high-privilege or admin scope requests.
  • Explicit scope escalation rules: Require additional confirmation steps or separate roles for approving requests that exceed common operational scopes (e.g., admin scopes).
  • Centralized policy engine: Use a unified authorization layer or policy engine (e.g., ABAC/RBAC with policy-as-code) to define and enforce "can_grant(scope)" rules instead of duplicating logic across modules.
  • Defense-in-depth controls: Apply secondary checks such as admin review workflows, multi-party approval for critical scopes, and rate limits or alerts on high-privilege approvals.

How teams detect issues like this

Organizations can look for this class of authorization flaws using a combination of code-level and operational techniques:

  • Static analysis and code search:
  • Identify authorization checks where the resource or requested scopes are visible, but the caller's scopes or roles are not passed in or validated.
  • Flag functions where "approve" or "grant" actions are performed without explicit comparison between approver capabilities and granted privileges.
  • Code review signals:
  • Approval flows (e.g., pairing, provisioning) that rely on implicit trust of the caller's role rather than explicit, centralized checks.
  • Modules where request scopes are processed but the approver identity or scopes are optional or ignored parameters.
  • Policy and test-based detection:
  • Introduce automated tests that attempt to approve high-scope requests using non-admin accounts and ensure these are rejected.
  • Use integration tests to assert invariants such as "no principal may grant scopes they do not already hold or are explicitly allowed to delegate."
  • Runtime monitoring:
  • Log all scope-granting and device-approval events with approver identity and before/after scope sets.
  • Alert on non-admin principals approving requests that result in admin or other sensitive scopes being granted.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/e403decb6e20091b5402780a7ccd2085f98aa3cd
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-hc5h-pmr3-3497
vulncheck.comvulncheck.com/advisories/openclaw-privilege-escalation-via-missing-caller-scope-validation-in-device-pair-approval

Frequently asked

questions

Exploitation is limited to authenticated users who already have pairing-related permissions. However, within that group, exploitation is straightforward: an attacker can leverage the flawed approval path to approve device requests with higher scopes than they are legitimately allowed to grant.

No. The core issue is that a non-admin user with pairing privileges can approve device requests that ask for admin or similarly broad scopes, effectively gaining access equivalent to an admin through the paired device or associated tokens.

The most robust fix is to centralize authorization logic so that all approval operations must supply the caller's identity and scope set, and to enforce a strict rule that no principal may grant scopes beyond those they are explicitly permitted to delegate.

Every approval endpoint should call this central policy, rather than implementing ad hoc checks.

Prevention typically involves designing APIs and services so that authorization is declarative and consistent:

  • Require subject context (identity and scopes/roles) as mandatory inputs to any approval or grant function.
  • Use a shared authorization library or policy engine with unit and integration tests enforcing "cannot grant what you don't have" rules.
  • Incorporate security-focused code review checklists and automated tests around all privilege-granting workflows, especially device pairing, provisioning, and admin-scope assignment.
Find out what's already
exploitable in your codebase.