/

CVE-2026-41303

Severity:

HIGH RISK

(8.8)

Authorization Bypass in OpenClaw Discord Exec Approval

CVE-2026-41303

Analyzed

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Elevation of Privilege and Unauthorized Command Execution

Severity:

HIGH RISK

(8.8)

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.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.approvers allowlist 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.approvers allowlist 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.approvers list
  • Set up alerts for unusual approval patterns, such as new or low-privilege users suddenly resolving many pending exec requests

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-98hh-7ghg-x6rq
vulncheck.comvulncheck.com/advisories/openclaw-authorization-bypass-in-discord-text-approval-commands

Frequently asked

questions

Exploitability depends on who can send commands in the monitored Discord channels. If untrusted or semi-trusted users can post messages where OpenClaw listens, they may be able to approve exec requests without being on the approver allowlist.

The attacker needs the capability to send Discord messages that OpenClaw processes, which could range from being a member of a Discord server/channel to having a bot account with posting permissions. They do not need to be configured as an approver in OpenClaw.

Centralize authorization and ensure that all exec approval operations go through a strict server-side check against a verified list of approvers, using stable identity attributes (like Discord user IDs). Avoid any code paths that can resolve or approve execution without consulting this centralized logic.

Adopt a defense-in-depth access control model:

  • Use a single, well-reviewed authorization module for all privileged actions
  • Require code reviews to verify that sensitive operations always call into this module
  • Integrate automated checks that flag new command handlers or endpoints that modify approvals or execution state without explicit authorization validation
  • Regularly test chat/command integrations with security reviews and targeted authorization test cases.
Find out what's already
exploitable in your codebase.