NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-41303: OpenClaw: Discord text `/approve` bypasses `channels.discord.execApprovals.approvers` and allows non-approvers to resolve pending exec approvals

highCVSS 4.0 8.7 · 3.1 8.8GHSA-98hh-7ghg-x6rq

In OpenClaw up to 2026.3.24, the Discord text /approve command resolved pending exec approvals without checking channels.discord.execApprovals.approvers. Any Discord user allowed to send commands could approve host execution the operator meant to gate. Fixed in 2026.3.28.

Published Mar 31, 2026 · Updated Apr 24, 2026 · Analysis Oct 31, 2026

What an attacker can do

OpenClaw can pause an agent's host command and ask a human to approve it in Discord. The operator names who may approve in execApprovals.approvers. The text command path, handled by handleApproveCommand in src/auto-reply/reply/commands-approve.ts, never compared the sender with that list. Button-style approval honored it. The text command did not.

The attacker is a Discord user who may send commands to the bot but is not an approver. They type /approve with a pending approval ID and the gateway executes the command on the host. Approval IDs are the practical hurdle, since they must be known. The result is host command execution with the agent's privileges, the very action the approval step was built to stop. Approval is the main safety control against prompt-injected commands, so bypassing it matters most where many people share a channel with the bot.

Who is affected

npm package openclaw, versions up to and including 2026.3.24, with Discord exec approvals configured. Affected files include extensions/discord/src/exec-approvals.ts. Check the version:

npm ls openclaw

Review the approvers list in your Discord channel config and who can send commands in that channel.

openclaw

Ecosystem
npm
Affected
<= 2026.3.24
Fixed in
2026.3.28
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.3.28 or later:

npm install [email protected]

Commit 355abe5eba adds isDiscordExecApprovalApprover and enforces it in /approve. Exec approvals are rejected when Discord exec approvals are disabled or the sender is not listed. Plugin approvals (plugin: prefix) require the sender to be an approver. Meanwhile, keep the set of users who can command the bot small.

How to tell if you were hit

Review Discord channel history and gateway logs for /approve messages sent by users not in execApprovals.approvers, and for host commands that ran right after. Match each approval against the approver list. The advisory gives no log signature. Beam records shell commands the agent ran on the host, so you can see which commands executed and when.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

Discord text approval commands resolved pending exec approvals without honoring the configured approver allowlist.

Impact

A Discord user who was allowed to send commands but was not in the approver list could still approve pending host execution.

Affected Component

extensions/discord/src/exec-approvals.ts, src/auto-reply/reply/commands-approve.ts

Fixed Versions

  • Affected: <= 2026.3.24
  • Patched: >= 2026.3.28
  • Latest stable 2026.3.28 contains the fix.

Fix

Fixed by commit 355abe5eba (Discord: enforce approver checks for text approvals).

Credited to tdjackey.

Questions

Is OpenClaw 2026.3.24 affected by CVE-2026-41303?

Yes, if you use Discord exec approvals. Versions up to and including 2026.3.24 are affected. Version 2026.3.28 fixes it.

What does the attacker need?

Permission to send commands to the bot in Discord, without being on the approvers list, and a pending approval to resolve.

Does the fix cover plugin approvals too?

Yes. Plugin approvals with the plugin: prefix now also require the sender to be on the approver list.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More OpenClaw vulnerabilities

All OpenClaw entries