Mar 20, 2026·5 min read·33 visits
OpenClaw gateway versions up to 2026.3.11 fail to strip client-declared scopes during WebSocket initialization if the client provides a valid shared token. This grants administrative access (e.g., operator.admin) to deviceless connections without server-side validation.
A logic flaw in the OpenClaw gateway WebSocket connection handler permits clients authenticating with shared tokens to self-declare and retain elevated administrative scopes. This vulnerability allows an attacker possessing a low-privileged shared secret to bypass intended device-identity boundaries and execute administrative RPC commands against the gateway.
The OpenClaw gateway relies on WebSocket connections to facilitate communication between client devices, the control UI, and backend services. During connection initialization, the gateway enforces an authorization model that binds specific access scopes to authenticated device identities or trusted control interfaces.
Versions of the openclaw npm package prior to 2026.3.12 contain a critical authorization bypass vulnerability within this WebSocket connection path. The issue arises from a logical error in how the gateway processes self-declared scopes provided by the client during the initial handshake.
The vulnerability is classified as Improper Privilege Management (CWE-269) and Missing Authorization (CWE-862). An attacker possessing a valid shared authentication token can exploit this flaw to assume arbitrary authorization scopes, completely bypassing the intended Role-Based Access Control (RBAC) mechanisms.
The root cause of the vulnerability resides in the attachGatewayWsMessageHandler function located in src/gateway/server/ws-connection/message-handler.ts. This function handles incoming WebSocket messages and manages connection state, including the assignment and validation of authorization scopes.
When a client connects, it can submit a requested array of scopes. The gateway is designed to strip these scopes using a clearUnboundScopes subroutine unless the connection is explicitly bound to a trusted Control UI operator or a strictly verified device identity.
The logic flaw occurs within the conditional statement that dictates when clearUnboundScopes executes. The vulnerable implementation skips scope clearing if the sharedAuthOk flag evaluates to true. This flag indicates only that the client successfully authenticated using a shared token or password, not that the client possesses the authorization required for the requested scopes.
By treating shared secret authentication as functionally equivalent to a trusted authorization binding, the gateway inherently trusts the client's self-declared scopes. This architectural confusion between authentication (verifying the shared token) and authorization (verifying the right to hold the operator.admin scope) directly causes the privilege escalation.
The vulnerable code in message-handler.ts defines the clearUnboundScopes function with a flawed conditional guard. If the client provides a valid shared token, sharedAuthOk is true, causing the function to exit without clearing the unbound scopes.
// Vulnerable Logic in src/gateway/server/ws-connection/message-handler.ts
const clearUnboundScopes = () => {
// BUG: If sharedAuthOk is true, scopes are NOT cleared.
if (scopes.length > 0 && !controlUiAuthPolicy.allowBypass && !sharedAuthOk) {
scopes = [];
connectParams.scopes = scopes;
}
};The patch implemented in commit 5e389d5e7c9233ec91026ab2fea299ebaf3249f6 addresses this by strictly separating the scope-clearing action from the authentication state. The clearUnboundScopes function was simplified to unconditionally clear scopes whenever invoked.
// Patched Logic
const clearUnboundScopes = () => {
if (scopes.length > 0) {
scopes = [];
connectParams.scopes = scopes;
}
};Furthermore, the patch relocates the authorization decision logic into the handleMissingDeviceIdentity block. Scopes are now stripped by default unless the connection definitively originates from an authorized Control UI path with explicit server-side trust.
// Authorization decision logic (Patched)
if (!device && (!isControlUi || decision.kind !== "allow")) {
clearUnboundScopes();
}Exploitation requires the attacker to possess a valid shared token or password for the OpenClaw gateway. This token provides basic authentication but is intentionally designed to lack administrative privileges when used without a paired device identity.
The attacker initiates a standard WebSocket connection to the gateway's endpoint. During the connection request, the attacker injects a JSON payload containing the shared token and an explicit declaration of elevated scopes, specifically operator.admin.
// Proof-of-Concept WebSocket Payload
const res = await connectReq(ws, {
token: "secret", // Known shared token
scopes: ["operator.admin"], // Self-declared elevated scope
device: null // Deviceless connection
});Upon processing this request, the vulnerable gateway verifies the token, sets sharedAuthOk = true, and skips the scope stripping subroutine. The server registers the connection state with the operator.admin scope applied.
The attacker can subsequently issue administrative Remote Procedure Calls (RPC) over the established WebSocket tunnel. For example, the attacker can submit a set-heartbeats RPC command to disable monitoring, which the server processes successfully due to the retained administrative scope.
The vulnerability carries a CVSS v3.1 score of 9.9, reflecting critical severity. The attack vector is network-based, requires low privileges (a standard shared token), and does not require user interaction.
Successful exploitation results in a complete bypass of the gateway's authorization model. An attacker achieves operator.admin access, granting them the ability to manage gateway configurations, modify heartbeat settings, and potentially pivot into internal administrative functions exposed via the WebSocket RPC interface.
The scope change (S:C) in the CVSS vector highlights that the vulnerability allows a low-privileged client component to manipulate the security posture of the central gateway infrastructure. This compromises the confidentiality, integrity, and availability of the system managed by OpenClaw.
The primary remediation for this vulnerability is to upgrade the openclaw package to version 2026.3.12 or later. The patch structurally resolves the logic flaw by enforcing strict server-side scope bindings and rejecting client-declared scopes for deviceless connections.
Organizations unable to patch immediately should rotate all shared authentication tokens and passwords. While this does not fix the underlying vulnerability, it prevents exploitation by attackers who may have obtained standard credentials through prior leaks or unauthorized access.
Network security teams should implement monitoring on the WebSocket traffic. Detection strategies should focus on identifying connection initialization payloads that attempt to claim operator.admin or similar sensitive scopes without an accompanying cryptographic device identity token.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
openclaw OpenClaw Ecosystem | <= 2026.3.11 | 2026.3.12 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-269 |
| Attack Vector | Network |
| CVSS Score | 9.9 (Critical) |
| Exploit Status | Proof of Concept |
| Authentication Required | Low (Shared Token) |
| User Interaction | None |
Improper Privilege Management
CVE-2026-63349 is a critical privilege-dropping bypass vulnerability in the AnyIO asynchronous framework (versions 4.14.0 and 4.14.1) on POSIX platforms. Due to a variable assignment typo, supplementary groups specified by the developer are not correctly propagated to the execution backend, resulting in subprocesses retaining the parent process's elevated supplementary group permissions.
CVE-2026-63406 is an information disclosure vulnerability in AnyCable-go prior to version 1.6.15. The built-in telemetry client is enabled by default with a hardcoded public authentication token ('secret'). This client digests highly sensitive configuration parameters and command-line arguments, including JWT secrets and RPC secrets, into a stable SHA-256 fingerprint. This fingerprint is sent over public networks, exposing those administrative secrets to offline dictionary and brute-force attacks if intercepted.
CVE-2026-84992 is a Cross-Site Scripting (XSS) vulnerability affecting md-editor-v3 before version 6.5.4. It occurs because the fenced-code block language parser directly interpolates unescaped language metadata into unquoted HTML attributes inside the custom rendering callback. This bypasses the built-in XSSPlugin which runs during the parsing phase, before rendering.
CVE-2026-81505 is a high-severity Broken Object Level Authorization (BOLA) / Insecure Direct Object Reference (IDOR) vulnerability in Convoy, a cloud-native webhooks gateway. In affected versions prior to 26.6.8, the single-item Source retrieval API endpoint authorizes project access but fails to confirm if the requested Source belongs to that specific project. This logical flaw allows authenticated users or project-scoped API key holders to bypass tenant isolation boundaries and retrieve unredacted, plaintext message broker credentials for Apache Kafka, Amazon SQS, RabbitMQ, and Google Cloud Pub/Sub belonging to other tenants. This issue is fully patched in version 26.6.8.
CVE-2026-77339 is a critical security vulnerability in Process Compose before version 1.120.0. The Model Context Protocol (MCP) Server-Sent Events (SSE) listener transport subsystem fails to validate the HTTP Host and Origin headers, and does not enforce authentication. This omissions expose local loopback listeners to DNS rebinding attacks orchestrated by malicious remote websites visited by developers, enabling unauthorized process control and arbitrary command execution.
CVE-2026-77301 is a critical uncontrolled resource allocation vulnerability in the popular Node.js library adm-zip (versions prior to 0.6.1). During ZIP decompression of asynchronous entries, the library trusts the uncompressed size metadata declared in the central directory headers. Because Node.js's streaming zlib API completely ignores the maxOutputLength configuration, a crafted ZIP archive (decompression bomb) causes the application to continually allocate resident memory buffers on the heap without limits, causing rapid memory exhaustion and a process-level Out-of-Memory (OOM) crash.