/

CVE-2026-28472

Severity:

HIGH RISK

(8.1)

Authentication Bypass in OpenClaw Gateway WebSocket

CVE-2026-28472

Analyzed

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-306

Impact:

Unauthorized Operator Access / Authentication Bypass

Severity:

HIGH RISK

(8.1)

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 gateway versions prior to 2026.2.2 contain a flaw in the WebSocket connection handshake that treats the mere presence of an auth.token as sufficient, without actually validating it or enforcing device identity checks.

In deployments where the gateway is reachable by attackers, this can allow unauthorized clients to connect as if they were paired or authenticated devices, potentially gaining operator-level access.

Affected context

The vulnerability appears in OpenClaw gateway deployments that:

  • Expose a WebSocket-based control or management endpoint
  • Rely on an auth.token for device or client authentication during the WebSocket handshake
  • Use logic that checks only for the presence of auth.token without validating its integrity or binding it to a known device identity

It is most relevant where the gateway is reachable over the network by untrusted or semi-trusted clients (e.g., over the internet, shared networks, or multi-tenant environments).

Exploit preconditions

  • Attack surface: Network-accessible OpenClaw gateway WebSocket endpoint.
  • Required access: Ability to open a WebSocket connection to the gateway (e.g., over LAN, WAN, VPN, or exposed service).
  • Trigger point: Initiating a WebSocket connect handshake that includes an auth.token field which is not actually validated by the server.
  • Why exploitation is possible: The handshake logic performs a presence check on auth.token instead of a verification step; as long as a token-like field exists, device identity and pairing checks may be skipped, causing the server to treat the connection as authenticated or paired.

Why this happens

This is a classic case of missing authentication for critical functionality, mapping to CWE-306.

The underlying bug is an insecure authentication flow where:

  • The gateway's WebSocket handshake handler uses a conditional such as "if auth.token exists" to decide whether a client is authenticated.
  • No cryptographic or semantic validation of the token is performed, and device identity or pairing attributes are not verified.
  • As a result, any client that includes an auth.token field, even a bogus or empty one, can bypass the intended device identity checks and gain elevated capabilities.

Abstractly, this reflects a broken assumption that the presence of an authentication artifact is proof of authentication, rather than treating it as untrusted data that must be validated and bound to a known identity and authorization context.

Potential impact

  • Unauthorized clients can connect to the gateway as if they were trusted devices.
  • Attackers may gain operator-level access to control functions exposed over the WebSocket API.
  • Malicious actors could send commands to managed devices or systems connected behind the gateway.
  • Configuration data, operational status, or telemetry accessible via the gateway can be read or altered.
  • In multi-tenant or shared environments, attackers may pivot to other systems reachable through the gateway's control plane.

General mitigation guidance

Effective mitigation focuses on enforcing robust authentication and authorization semantics for the WebSocket handshake:

  • Treat all auth.token values as untrusted until they are fully validated (e.g., cryptographically verified, checked for expiration, and bound to a specific device identity or account).
  • Implement strict device identity and pairing checks that cannot be skipped based solely on the presence of a token field.
  • Centralize authentication logic so that all connection paths (including WebSocket upgrades) pass through the same validation routines and authorization checks.
  • Apply least-privilege principles: even after successful authentication, scope permissions to the minimal operator actions the device or user actually needs.
  • Enable secure-by-default configurations so that unauthenticated connections have no operational capabilities and must explicitly pass through verified authentication flows.
  • Complement protocol-level protections with network-level controls (e.g., restricting gateway exposure to trusted networks) to reduce the reach of unauthenticated attack traffic.

How teams detect issues like this

Detection generally involves a combination of code-level and behavior-level analysis:

  • Static analysis / code review:
  • Search for WebSocket handshake handlers that gate access on a simple "token present" condition without calling verification or identity-binding routines.
  • Flag authentication checks that do not verify token signatures, expiration, or ownership.
  • Verify that all gateway entry points (REST, WebSocket, RPC) use consistent authentication middleware or common validation functions.
  • Security testing / dynamic analysis:
  • Attempt WebSocket connections with arbitrary or malformed auth.token values and observe whether access is granted.
  • Validate that removing or altering the token produces predictable and strict denial of access.
  • Policy enforcement:
  • Use CI/CD policies that require explicit token validation calls for any new authentication-related code paths.
  • Incorporate automated tooling (SAST/DAST) configured with rules for missing or partial authentication checks in WebSocket flows.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/fe81b1d7125a014b8280da461f34efbf5f761575
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-rv39-79c4-7459
vulncheck.comvulncheck.com/advisories/openclaw-device-identity-check-bypass-in-gateway-websocket-connect-handshake

Frequently asked

questions

Yes, if the OpenClaw gateway's WebSocket endpoint is accessible from untrusted networks (such as the internet or a shared corporate network), attackers can potentially exploit this issue remotely by initiating crafted WebSocket connections.

An attacker only needs network access to the gateway's WebSocket interface. No valid credentials or pre-established device pairing are required if the endpoint is reachable, because the flaw treats any auth.token field as sufficient.

The safest pattern is to enforce strict, centralized authentication for all connection types:

  • Always validate auth.token values using secure verification routines.
  • Ensure that device identity and pairing checks are mandatory and cannot be bypassed.
  • Deny all access by default when token verification fails or device identity is absent.

Preventive measures include:

  • Designing authentication flows that never equate "presence of a token" with "authenticated user or device".
  • Reusing well-tested authentication middleware or libraries instead of ad hoc checks.
  • Mandating security reviews for new or modified authentication and WebSocket code paths.
  • Incorporating automated tests and tooling that verify authentication behavior under malformed or missing token conditions.
Find out what's already
exploitable in your codebase.