/

CVE-2026-53821

Severity:

HIGH RISK

(8.8)

Missing Authorization (CWE-862) in OpenClaw WebSockets

CVE-2026-53821

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Privilege Escalation to Administrative Operations

Severity:

HIGH RISK

(8.8)

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 versions before 2026.5.18 accept WebSocket client-declared operator scopes before fully validating them against server-approved pairing or trusted-proxy baselines.

Under these conditions, an unpaired or low-privilege Control UI client can inherit cached operator.admin authority on a live WebSocket connection and invoke admin-gated Gateway RPCs.

Affected context

The vulnerability arises in OpenClaw deployments that expose a WebSocket-based Control UI or similar clients to Gateway RPC functionality.

It is most relevant where:

  • WebSocket connections are long-lived and reused for multiple operations
  • Client-declared scopes are accepted prior to binding against server-side pairing data or trusted-proxy authorization rules
  • Operator scope state is cached and applied to the connection context

In such environments, UI clients with incomplete pairing or limited trusted-proxy permissions may still gain effective operator.admin capabilities.

Exploit preconditions

  • Attack surface: WebSocket-based Control UI or similar client endpoints connected to the OpenClaw Gateway.
  • Required access: Ability to initiate or maintain a WebSocket session as an unpaired or restricted-trust client (e.g., via a Control UI instance or proxied connection).
  • Trigger point: Submission or reuse of client-declared operator scopes before the server has fully bound the session to an approved pairing or trusted-proxy baseline.
  • Why exploitation is possible: The server-side authorization flow trusts client-presented scopes and cached connection state too early, allowing an under-authorized client to inherit operator.admin authority without a corresponding server-side authorization decision.

Why this happens

This issue is a classic case of missing authorization (CWE-862) within a stateful, real-time messaging channel.

The WebSocket authorization design:

  • Accepts and applies client-declared operator scopes to the session context
  • Defers or weakly enforces the binding of those scopes to a server-approved pairing or trusted-proxy baseline
  • Reuses cached operator state for subsequent Gateway RPC invocations

Because authorization checks do not consistently verify that each high-privilege operation is grounded in a server-controlled identity and policy, under-privileged clients can perform admin-only actions.

Conceptually, the bug is an insecure pattern where trust is inferred from connection state and self-asserted scopes instead of being derived from a verified identity and least-privilege access control on every sensitive request.

Potential impact

  • A restricted or unpaired Control UI client may execute admin-gated Gateway RPCs.
  • An attacker could escalate privileges to effective operator.admin within the affected connection.
  • Administrative configuration or routing changes could be triggered without proper approval.
  • Critical gateway operations, such as service control, policy updates, or maintenance commands, may be invoked outside intended governance.
  • Logging and audit trails may misattribute actions, complicating incident response.

General mitigation guidance

Effective mitigation focuses on enforcing server-centric, explicit authorization for every privileged action on WebSocket channels:

  • Bind operator scopes strictly to server-validated identities, pairings, or trusted-proxy assertions, rather than trusting client-declared roles.
  • Apply per-request authorization checks for admin-gated Gateway RPCs, ensuring that cached connection state alone never suffices for privilege decisions.
  • Design WebSocket session handling so that privilege elevation cannot occur until the full authentication and authorization pipeline has completed and been explicitly confirmed.
  • Separate connection establishment from privilege assignment, using clear state transitions and fail-closed behavior when pairing or trust validation is incomplete.
  • Implement least-privilege defaults for all connections, with admin scopes granted only via explicit server-side policy.
  • Consider isolating administrative RPC endpoints or channels behind additional access control layers or dedicated operator interfaces.

How teams detect issues like this

Detection can combine design-level review, code inspection, and runtime monitoring:

  • During code review, look for places where WebSocket handlers apply roles or scopes derived directly from client messages or connection metadata without consulting centralized authorization services.
  • Use static analysis or custom grep rules to flag code paths where Gateway RPC handlers rely on connection flags or self-declared scopes instead of explicit policy checks.
  • Validate that all admin-gated RPCs enforce a common authorization middleware or interceptor, rather than ad-hoc trust in connection state.
  • In test environments, simulate unpaired or low-privilege clients and attempt admin-only operations to verify that authorization consistently fails.
  • Analyze logs for patterns where sessions with non-admin identities appear to invoke admin-class RPCs, and ensure security analytics can surface such anomalies.
  • Incorporate authorization regression tests into CI to assert that new WebSocket flows cannot bypass central access control policies.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-qjpc-qf9m-xwmr
vulncheck.comvulncheck.com/advisories/openclaw-scope-elevation-in-trusted-proxy-control-ui-websocket

Frequently asked

questions

It can be, if the WebSocket Control UI or equivalent endpoints are reachable over a network boundary that attackers can access. Exploitation depends on whether unpaired or restricted clients can establish WebSocket connections and send scoped requests.

The attacker typically needs the ability to act as an unpaired or restricted trusted-proxy client capable of opening or maintaining WebSocket sessions. They do not need legitimate operator.admin credentials, only the ability to reach the affected endpoint and exercise the flawed authorization flow.

The most robust fix is to centralize authorization so that all admin-gated Gateway RPCs are evaluated against server-controlled identity and policy, and to ensure that WebSocket connection state and client-declared scopes cannot grant privileges without confirmed pairing or trust validation.

Future designs should treat WebSocket and other long-lived channels like any other API surface: enforce strong authentication first, derive privileges exclusively from server-side policy, apply least privilege, and require explicit authorization checks for each sensitive operation rather than inferring trust from self-asserted or cached connection attributes.

Find out what's already
exploitable in your codebase.