Summary
OpenClaw Gateway builds before 2026.5.18 contain an authorization scope bypass in the chat.send route that lets scoped clients execute commands requiring higher privileges.
By abusing inherited external routes, an attacker holding only the operator.write scope can bypass operator.approvals and operator.admin checks to perform unauthorized plugin, configuration, MCP, allowlist, and ACP changes.
Affected context
The vulnerability affects OpenClaw deployments that:
- Expose the Gateway
chat.sendroute to scoped clients (e.g., service-to-service or client applications) - Rely on scope-based authorization to separate
operator.writefrom higher-privileged scopes such asoperator.approvalsandoperator.admin - Allow external routing or command dispatch through the chat gateway to reach internal operator or management functionality
In these environments, authorization logic in chat.send does not consistently enforce the stricter scopes required by downstream privileged operations.
Exploit preconditions
- Attack surface: OpenClaw Gateway
chat.sendHTTP/WebSocket/API endpoint, reachable by clients or services with valid credentials. - Required access: Valid client identity with at least the
operator.writescope and the ability to send messages or commands viachat.send. - Trigger point: Submission of specially crafted chat/command payloads that are routed through inherited external routes toward privileged operator functionality.
- Why exploitation is possible: The authorization checks on the gateway route are incomplete or misaligned with the checks on the privileged operations, allowing
operator.write-scoped requests to be treated as if they possessedoperator.approvalsoroperator.adminfor certain command paths.
Why this happens
This issue stems from incorrect authorization logic (CWE-863) where the effective privilege of a request is derived from the gateway route rather than the actual sensitivity of the target operation.
The chat.send route acts as a generic dispatch mechanism and forwards messages into external or inherited routes that eventually perform privileged actions, but the scope validation at the entry point does not enforce the stricter scopes required by those actions.
As a result, the system treats a lower-privileged operator.write token as sufficient to initiate workflows that should demand operator.approvals or operator.admin, leading to a scope escalation path through the routing layer.
Potential impact
- Unauthorized modification of plugins, including installation, removal, or configuration changes.
- Unapproved or hidden configuration changes that can alter system behavior or weaken security controls.
- Unauthorized updates to MCP (model/control/management) parameters, potentially impacting AI behavior or policy enforcement.
- Manipulation of allowlists and ACP (access control policies), which can open new attack surfaces or grant persistent over-privilege.
- Indirect privilege escalation where an attacker uses configuration changes to gain broader access or disrupt operations.
General mitigation guidance
Effective mitigation focuses on making authorization contextual and least-privilege-aware across all routing layers:
- Enforce operation-level authorization: each privileged operation (plugin management, config changes, ACP updates, etc.) should verify its required scopes independently of the gateway route that invoked it.
- Normalize and centralize scope mapping: define a clear mapping between scopes and operations, and have all entry points reference the same canonical policy rather than ad hoc checks.
- Restrict generic dispatch endpoints: limit which internal or external routes can be reached from
chat.send, especially those performing administrative actions; consider separate administrative APIs that are not exposed through user-facing chat routes. - Apply defense-in-depth checks: require stronger scopes or multi-step approval flows (e.g., explicit approvals, dual control) for sensitive configuration and policy mutations.
- Design scopes using least privilege and avoid over-broad scopes like
writethat implicitly grant access to administrative workflows.
How teams detect issues like this
To detect similar authorization bypass patterns, organizations can:
- Perform authorization-oriented code review, validating that each privileged handler enforces its own scope or role requirements and does not rely solely on upstream routing assumptions.
- Use static analysis or policy-as-code tools to identify routes or methods that:
- Call administrative or configuration-modifying functions
- Are guarded only by lower-privilege scopes such as
*write - Skip or weaken checks compared to other code paths invoking the same operations
- Implement centralized authorization logging, recording requested scopes, evaluated operations, and decisions; analyze these logs for cases where low-privilege scopes succeed on high-privilege operations.
- Add unit and integration tests for access-control rules, including negative tests that ensure
operator.writecannot reach administrative routes or configuration mutation endpoints.

