/

CVE-2026-26317

Severity:

HIGH RISK

(7.1)

CSRF in OpenClaw Browser Control Plane

CVE-2026-26317

Analyzed

Vulnerability type

Category:

Cross-Site Request Forgery (CSRF)

CWE:

CWE-352

Impact:

Unauthorized State Change via Cross-Site Requests

Severity:

HIGH RISK

(7.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's browser-facing localhost mutation routes accepted cross-origin browser requests without validating the Origin or Referer headers.

When the browser control plane is reachable on loopback, a malicious website loaded in the same browser can silently issue state-changing requests, potentially opening tabs, starting or stopping the controlled browser, and mutating storage or cookies.

Affected context

This vulnerability occurs in OpenClaw deployments where the browser control plane exposes HTTP mutation routes bound to localhost and is used from a regular web browser.

It is most relevant when:

  • The control service is reachable from the victim's browser context (e.g., default loopback binding on a known port).
  • CSRF protections do not enforce Origin/Referer/Sec-Fetch-Site checks on state-changing HTTP methods.
  • Authentication on the browser control service is disabled or weakly enforced.

In such setups, untrusted web pages can indirectly interact with the local control plane through the victim's own browser.

Exploit preconditions

  • Attack surface: Local HTTP endpoints exposed by the OpenClaw browser control plane on 127.0.0.1 (loopback).
  • Required attacker position: Ability to lure the victim into visiting a malicious web page in a browser that can reach the localhost control port.
  • Required victim state: Victim is running OpenClaw with the browser control service active and reachable; control-plane auth is disabled or the browser is already authenticated.
  • Trigger point: The malicious site issues crafted POST/PUT/PATCH/DELETE requests from the victim's browser to the localhost control endpoints.
  • Why exploitation is possible: The service accepts cross-origin, state-changing requests without verifying that the Origin/Referer (or Sec-Fetch-Site) indicates a same-origin or loopback context, so the browser's same-origin policy does not prevent the CSRF-style interaction.

Why this happens

The underlying issue is a lack of CSRF defenses on sensitive localhost endpoints that perform stateful actions.

The browser control plane treats any reachable HTTP request as trusted, even when initiated by a different web origin through the victim's browser, and does not enforce validation of Origin/Referer or Sec-Fetch-Site headers.

This maps to CWE-352: Cross-Site Request Forgery (CSRF), where a web application performs unintended actions on behalf of a user because it cannot distinguish between legitimate in-context requests and cross-origin, attacker-initiated requests.

The insecure pattern is the combination of:

  • Exposing state-changing HTTP APIs to a browser context; and
  • Relying only on loopback binding for protection, without explicit anti-CSRF checks or robust authentication on mutating routes.

Potential impact

  • A malicious website may open or close tabs in the controlled browser environment.
  • An attacker could start or stop the browser engine or automation controlled by OpenClaw.
  • Local browser state such as cookies, local storage, or session data may be modified or cleared.
  • User workflows and automation tasks could be disrupted or hijacked.
  • Follow-on attacks may be enabled by manipulating authenticated browser sessions (for example, logging out, changing active contexts, or steering navigation).

General mitigation guidance

Effective mitigation focuses on enforcing strict request validation and reducing trust in browser-initiated localhost traffic:

  • Require and validate Origin and Referer headers (and Sec-Fetch-Site where available) for all state-changing HTTP methods, allowing only loopback or explicitly trusted origins.
  • Treat all mutating routes (POST/PUT/PATCH/DELETE) as sensitive and apply CSRF controls consistently, including rejecting requests with missing or ambiguous origin signals.
  • Prefer authenticated designs for localhost control planes, using unguessable tokens or credentials that are not automatically attached by the browser to arbitrary sites.
  • Isolate browser control endpoints from general web content by using non-browser clients, restricted ports, or separate processes where feasible.
  • Apply the principle of least privilege in the control API surface: limit which actions are exposed over HTTP and avoid unnecessary mutable operations.

These patterns help ensure that even if a victim visits an untrusted site, cross-origin pages cannot silently drive sensitive local APIs.

How teams detect issues like this

Detection can rely on a mix of code-centric and runtime techniques:

  • Static analysis / code review:
  • Flag HTTP handlers that perform state-changing operations and are reachable from a browser context but do not check Origin/Referer/Sec-Fetch-Site.
  • Identify localhost-bound services that are intended for browser use yet lack CSRF tokens or origin validation.
  • Look for permissive CORS configurations that allow * or broad origins on mutation endpoints.
  • Runtime and testing:
  • Implement security tests that attempt cross-origin requests from a synthetic malicious origin to localhost endpoints, verifying they are rejected or challenged.
  • Use browser dev tools or automated test harnesses to inspect response behavior when Origin is cross-site, omitted, or forged.
  • Policy enforcement:
  • Define internal guidelines requiring explicit origin-check middleware on any state-changing route exposed to browsers.
  • Integrate automated review tools or linters that fail builds when sensitive endpoints lack CSRF-related safeguards.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/b566b09f81e2b704bf9398d8d97d5f7a90aa94c3
github.comgithub.com/openclaw/openclaw/releases/tag/v2026.2.14
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-3fqr-4cg8-h96q

Frequently asked

questions

It is indirectly exploitable: an attacker typically cannot reach the localhost control plane directly over the network, but can abuse the victim's own browser to send requests to 127.0.0.1 after luring them to a malicious site.

The attacker needs only the ability to get the victim to open a malicious web page (for example, via a link or embedded content). Direct network access to the victim's machine or the OpenClaw service is not required if the browser can reach the localhost control endpoint.

Enforce strict origin-aware CSRF protections on all mutation routes—reject or challenge any request whose Origin/Referer or Sec-Fetch-Site does not clearly indicate a trusted, loopback, or same-origin context, and pair this with robust authentication on the control plane.

Design localhost browser APIs as if they were internet-facing: require authentication, validate origins for every state-changing operation, minimize exposed actions, and include CSRF and CORS checks as standard middleware in the control plane architecture.

Find out what's already
exploitable in your codebase.