CVE-2026-32302 Overview
CVE-2026-32302 is an Origin Validation Bypass vulnerability in OpenClaw, a personal AI assistant application. Prior to version 2026.3.11, browser-originated WebSocket connections could bypass origin validation when gateway.auth.mode was set to trusted-proxy and the request arrived with proxy headers. This flaw allows a page served from an untrusted origin to connect through a trusted reverse proxy, inherit proxy-authenticated identity, and establish a privileged operator session.
Critical Impact
An attacker can exploit this vulnerability to hijack authenticated sessions and gain unauthorized privileged access to the OpenClaw AI assistant by bypassing origin validation through crafted WebSocket connections.
Affected Products
- OpenClaw versions prior to 2026.3.11
- OpenClaw deployments using gateway.auth.mode set to trusted-proxy
- OpenClaw instances behind trusted reverse proxies
Discovery Timeline
- 2026-03-13 - CVE CVE-2026-32302 published to NVD
- 2026-03-16 - Last updated in NVD database
Technical Details for CVE-2026-32302
Vulnerability Analysis
This vulnerability is classified under CWE-346 (Origin Validation Error), which occurs when a product fails to properly verify that the source of data or communication is valid. In the context of OpenClaw, the WebSocket message handler in the gateway server incorrectly trusted requests when proxy headers were present, effectively disabling origin checks for browser clients connecting through reverse proxies.
The fundamental flaw lies in the conditional logic that determines whether to enforce origin validation. The original implementation would skip origin checks for any browser-originated request that also contained proxy headers, under the flawed assumption that proxy presence implied trusted traffic. This created a dangerous scenario where attackers could craft malicious pages that leverage a legitimate proxy to establish privileged sessions.
Root Cause
The root cause is improper conditional logic in the WebSocket connection handler. The enforceOriginCheckForAnyClient flag was incorrectly set to false when both hasBrowserOriginHeader was true AND params.hasProxyHeaders was true. This meant that browser requests arriving through proxies bypassed origin validation entirely, allowing cross-origin WebSocket connections to inherit authenticated proxy identities.
Attack Vector
The attack is network-based and requires user interaction. An attacker would need to:
- Host a malicious web page on an untrusted origin
- Trick a victim into visiting the malicious page
- The page initiates a WebSocket connection to the target OpenClaw instance
- If the victim's traffic routes through a trusted reverse proxy (common in corporate environments), the proxy headers cause origin validation to be skipped
- The WebSocket connection inherits the proxy-authenticated identity
- The attacker gains a privileged operator session through the victim's browser
);
return {
hasBrowserOriginHeader,
- enforceOriginCheckForAnyClient: hasBrowserOriginHeader && !params.hasProxyHeaders,
+ enforceOriginCheckForAnyClient: hasBrowserOriginHeader,
rateLimitClientIp:
hasBrowserOriginHeader && isLoopbackAddress(params.clientIp)
? BROWSER_ORIGIN_LOOPBACK_RATE_LIMIT_IP
Source: GitHub Commit Update
The patch removes the && !params.hasProxyHeaders condition, ensuring that origin checks are enforced for all browser-originated connections regardless of proxy header presence.
Detection Methods for CVE-2026-32302
Indicators of Compromise
- Unexpected WebSocket connections from external or untrusted origin headers in gateway logs
- Authenticated operator sessions initiated from unrecognized or suspicious browser origins
- WebSocket connection logs showing origin headers that don't match expected application domains
- Anomalous proxy header combinations paired with cross-origin browser requests
Detection Strategies
- Monitor WebSocket connection logs for origin mismatches where authenticated sessions are established from untrusted domains
- Implement alerting on gateway logs when trusted-proxy mode accepts connections with suspicious origin headers
- Review authentication logs for sessions that were established via proxy authentication but originated from external browser origins
- Deploy network monitoring to detect WebSocket upgrade requests from anomalous referrers
Monitoring Recommendations
- Enable detailed logging for the OpenClaw gateway WebSocket handler to capture origin headers and proxy header combinations
- Set up security information and event management (SIEM) rules to correlate proxy-authenticated sessions with unexpected browser origins
- Periodically audit gateway.auth.mode configurations to identify instances running in trusted-proxy mode
How to Mitigate CVE-2026-32302
Immediate Actions Required
- Upgrade OpenClaw to version 2026.3.11 or later immediately
- Review gateway logs for any evidence of exploitation prior to patching
- Temporarily disable trusted-proxy authentication mode if an immediate upgrade is not possible
- Audit all active operator sessions and invalidate any suspicious or unrecognized sessions
Patch Information
The vulnerability is fixed in OpenClaw version 2026.3.11. The security patch modifies src/gateway/server/ws-connection/message-handler.ts to enforce browser origin checks regardless of proxy headers. Organizations should update to this version or later by pulling the latest release from the official GitHub repository.
For detailed patch information, refer to the GitHub Security Advisory GHSA-5wcw-8jjv-m286.
Workarounds
- Switch gateway.auth.mode from trusted-proxy to a more restrictive authentication mode until patching is complete
- Implement additional origin validation at the reverse proxy layer to reject requests with suspicious origin headers
- Restrict WebSocket endpoint access through network-level controls to limit exposure from untrusted origins
- Deploy a Web Application Firewall (WAF) rule to validate origin headers on WebSocket upgrade requests
# Example: Disable trusted-proxy mode in OpenClaw configuration
# Edit openclaw.config.yaml
gateway:
auth:
mode: "direct" # Change from "trusted-proxy" to "direct" authentication
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

