/

CVE-2026-41347

Severity:

HIGH RISK

(7.1)

CSRF in OpenClaw HTTP Operator Endpoints

CVE-2026-41347

Analyzed

Vulnerability type

Category:

Cross-Site Request Forgery (CSRF)

CWE:

CWE-352

Impact:

Unauthorized Action Execution via Victim Browser

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 before 2026.3.31 lacks browser-origin validation on HTTP operator endpoints when running in trusted-proxy mode, enabling cross-site request forgery (CSRF).

In deployments where a browser is used to access OpenClaw through a trusted proxy, an attacker can cause a victim's browser to send unintended, authenticated requests to HTTP operator endpoints and perform unauthorized actions.

Affected context

This vulnerability affects OpenClaw instances that:

  • Are deployed in trusted-proxy mode, where HTTP requests are considered authenticated or trusted based on proxy headers or network location.
  • Expose HTTP operator endpoints that perform state-changing or administrative actions.
  • Are accessed from a browser that maintains session state (e.g., cookies, bearer tokens, or client certificates).

In this context, OpenClaw does not enforce browser-origin or anti-CSRF protections, so the application cannot distinguish legitimate user actions from forged cross-site requests.

Exploit preconditions

  • Attack surface: HTTP operator endpoints in OpenClaw deployments reachable via a browser through a trusted proxy.
  • Required access:
  • The victim must be authenticated or implicitly trusted to use the operator endpoints (e.g., via session cookies, SSO, or network trust).
  • The attacker needs the ability to get the victim to load attacker-controlled web content (e.g., a malicious website, phishing email link, or injected iframe).
  • Trigger point:
  • The victim's browser automatically sends authenticated requests (including cookies or headers) to OpenClaw's HTTP operator endpoints when visiting attacker-controlled content that embeds cross-site requests.
  • Why exploitation is possible:
  • In trusted-proxy mode, OpenClaw relies on proxy trust rather than enforcing origin or CSRF token checks.
  • The application accepts state-changing requests from browsers without requiring proof that the request originated from the legitimate OpenClaw UI.

Why this happens

The core issue is the lack of CSRF defenses for sensitive HTTP operator endpoints in browser-accessible contexts.

Under CWE-352, CSRF occurs when a web application:

  • Relies on ambient browser authentication (cookies, auth headers) for sensitive operations, and
  • Fails to tie those operations to a verifiable user interaction from the legitimate origin.

In trusted-proxy mode, OpenClaw trusts the incoming requests based on infrastructure assumptions but does not validate browser-origin metadata (such as Origin/Referer headers) nor require anti-CSRF tokens or double-submit mechanisms.

As a result, any website the victim visits can craft requests that the browser will automatically send to OpenClaw with the victim's credentials, and OpenClaw will treat them as legitimate operator actions.

Potential impact

  • Attackers could trigger unauthorized administrative or operational actions on HTTP operator endpoints using a victim's privileges.
  • Critical configuration changes may be applied without the victim's knowledge.
  • Operational workflows (e.g., starting, stopping, or reconfiguring jobs/services) could be manipulated, potentially disrupting service availability.
  • Security-relevant settings or access controls could be weakened or misconfigured through forged requests.
  • Logging or monitoring behaviors could be altered, reducing visibility into subsequent malicious activity.

General mitigation guidance

Effective mitigation generally involves adding robust CSRF protections and re-evaluating trust assumptions in proxy-based deployments:

  • Enforce CSRF tokens: Require unguessable, per-session or per-request tokens for all state-changing HTTP operator endpoints accessed via a browser, validating them server-side.
  • Validate origin for browser traffic: Check the Origin and/or Referer headers on relevant endpoints and accept requests only from known, trusted origins associated with the legitimate OpenClaw UI.
  • Differentiate browser vs. non-browser clients: Prefer explicit API authentication (e.g., API keys, OAuth2 tokens) from automation components and avoid ambient browser credentials for high-risk operator functions.
  • Apply least privilege to operator actions: Ensure operator endpoints enforce strict authorization checks and minimize the scope of what each authenticated principal can do.
  • Separate administrative surfaces: Where feasible, isolate operator endpoints on dedicated hostnames or interfaces not directly accessed by end-user browsers, reducing exposure to CSRF.
  • Harden trusted-proxy assumptions: Treat proxy-based trust as an additional layer, not a substitute for application-level request validation and CSRF defenses.

How teams detect issues like this

Organizations can detect and monitor for this class of issue using several approaches:

  • Static analysis and linting:
  • Flag state-changing HTTP handlers that:
  • Are reachable from browser contexts, and
  • Do not enforce CSRF tokens, origin checks, or explicit non-browser authentication.
  • Code review checklists:
  • Require reviewers to verify that:
  • Operator or administrative endpoints include CSRF protections when they are browser-accessible.
  • Trusted-proxy code paths do not bypass standard web security controls (CSRF, authz checks).
  • Configuration and policy enforcement:
  • Implement security policies that mandate CSRF mechanisms for all non-idempotent endpoints exposed to browsers (e.g., POST/PUT/PATCH/DELETE).
  • Use security gateways or WAF rules that can verify Origin headers or block suspicious cross-site request patterns where appropriate.
  • Runtime monitoring:
  • Monitor logs for anomalous operator actions, especially those coming from unusual Referer or Origin values, or from unexpected client IP ranges behind the trusted proxy.
  • Alert on bursts of operator actions that deviate from normal usage patterns for a given user or service identity.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/6b3f99a11f4d070fa5ed2533abbb3d7329ea4f0d
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-mhr7-2xmv-4c4q
vulncheck.comvulncheck.com/advisories/openclaw-cross-site-request-forgery-via-missing-browser-origin-validation-in-http-operator-endpoints

Frequently asked

questions

Yes, in deployments where the OpenClaw UI or operator endpoints are reachable from users' browsers via a trusted proxy, an attacker on the internet can exploit the issue by luring authenticated users to malicious web content that issues forged requests.

The attacker does not need direct access to the OpenClaw instance. They only need to:

  • Know or guess the relevant operator endpoint paths, and
  • Convince a user who is authenticated or trusted by the OpenClaw deployment to visit an attacker-controlled webpage.

The attacker then leverages the victim's existing access rights to execute unauthorized actions.

The most robust fix is to treat all browser-initiated, state-changing requests to operator endpoints as CSRF-sensitive:

  • Require cryptographically strong CSRF tokens or equivalent mechanisms.
  • Validate the request origin against a strict allowlist.
  • Ensure that trusted-proxy mode does not bypass these protections.

  • Design new endpoints with a clear separation between browser-facing UIs and machine-to-machine APIs.
  • Make CSRF protections a default for any browser-facing state-changing route (e.g., framework-level middleware).
  • Incorporate CSRF and origin validation checks into engineering standards, code review templates, and automated security testing in CI/CD.
Find out what's already
exploitable in your codebase.