Summary
OpenClaw before 2026.3.28 contains an authorization bypass in its Discord-based text approval commands, allowing users who are not on the designated approver allowlist to resolve pending execution approvals.
By sending crafted Discord text commands, an attacker can bypass channels.discord.execApprovals.approvers checks and approve pending host execution requests, potentially leading to unauthorized code execution on managed hosts.
Affected context
This vulnerability affects OpenClaw deployments that integrate Discord as a control plane for host execution approvals.
Specifically, it manifests when:
- Discord text commands are used to approve or resolve execution requests
- The
channels.discord.execApprovals.approversallowlist is expected to restrict who can approve exec operations - The backend logic fails to correctly enforce that only approved Discord identities can finalize pending host execution approvals
Exploit preconditions
- Attack surface: Discord text command interface connected to OpenClaw
- Required access: Ability to send messages/commands in the relevant Discord channel where OpenClaw listens for exec approval commands
- Trigger point: Issuing a specially formatted approval command while there exists a pending host execution request
- Why exploitation is possible: The server-side authorization logic does not consistently validate the issuing user's membership in the
channels.discord.execApprovals.approversallowlist before resolving pending approvals
Why this happens
The underlying flaw is a broken authorization check corresponding to CWE-863: Incorrect Authorization.
While the system is configured with an allowlist (channels.discord.execApprovals.approvers) meant to restrict who can approve host execution, the implementation of Discord text approval commands does not reliably enforce this list.
As a result, the approval endpoint or command handler treats user-supplied commands as trusted and final without confirming that the Discord identity is authorized to act on pending execution requests, leading to an authorization bypass.
Potential impact
- Non-approvers may approve or resolve pending host execution requests
- Attackers could trigger unauthorized commands or scripts on managed hosts via approved exec flows
- Elevation of privilege within operational environments controlled via OpenClaw
- Potential compromise of servers, services, or infrastructure managed by OpenClaw if exec actions are powerful
- Integrity and auditability of approval workflows can be undermined, reducing trust in change-control processes
General mitigation guidance
Effective mitigation focuses on enforcing strict, server-side authorization for all approval actions and decoupling trust from user-controlled channels:
- Ensure that every exec approval resolution path checks the caller against a canonical, server-side allowlist (e.g., mapped Discord user IDs to approver roles)
- Use a single source of truth for authorization decisions, rather than relying on client-side assumptions or channel-level visibility
- Normalize identity handling (e.g., always verify Discord user ID instead of display name or message metadata) before applying authorization rules
- Apply least-privilege design to approval roles, limiting the size and power of approver groups
- Introduce defense-in-depth controls around host execution flows, such as secondary validation, rate limiting, or environmental constraints on approved commands
How teams detect issues like this
Detection approaches typically focus on review of authorization logic and runtime behavior:
- Code-level detection:
- Review command handlers for exec approval to verify that authorization checks are performed after authentication and before any state changes
- Use static analysis or custom linters to flag sensitive operations (e.g., host exec, approval resolution) that do not reference centralized authorization utilities
- Search for direct state mutations of approval objects or workflows that lack role/allowlist validation
- Configuration and policy review:
- Confirm that Discord user IDs and roles are consistently mapped to internal approver records
- Enforce policies requiring that all privileged actions flow through a standard authorization middleware or service
- Runtime monitoring:
- Audit exec approval logs for events where approvals are issued by identities not in the configured
channels.discord.execApprovals.approverslist - Set up alerts for unusual approval patterns, such as new or low-privilege users suddenly resolving many pending exec requests

