Summary
OpenClaw contains an authorization bypass where users with only operator.write scope can approve or deny exec approval requests by invoking the /approve chat command.
Because this command is routed through an internal privileged gateway client that skips the normal operator.approvals permission check, lower-privileged operators can resolve sensitive exec approvals they should not control.
Affected context
This vulnerability affects OpenClaw deployments that:
- Use the exec approval workflow for controlling privileged exec actions
- Expose a chat-style interface or bot that supports the
/approvecommand - Rely on
operator.approvalspermissions to gate access toexec.approval.resolve
In such environments, any client or operator identity granted operator.write scope but not operator.approvals may still be able to resolve approval requests through the chat command path.
Exploit preconditions
- Attack surface: Application control plane / chat or bot interface used to manage exec approvals
- Required access: An authenticated account or client with
operator.writescope and the ability to send/approvecommands - Trigger point: Sending a crafted
/approvechat command that targets an existing exec approval request - Why exploitation is possible:
- The
/approvecommand is implemented via an internal privileged gateway client - That gateway directly calls
exec.approval.resolvewithout enforcing theoperator.approvalspermission check that applies to direct RPC calls - As a result, authorization decisions depend on the gateway's elevated privileges rather than the caller's true permission set
Why this happens
The root cause aligns with CWE-863: Incorrect Authorization, specifically an inconsistency between authorization enforcement across different call paths to the same sensitive operation.
OpenClaw correctly protects direct RPC access to exec.approval.resolve with an operator.approvals permission check. However, the chat /approve command is wired through an internal privileged gateway client that skips this check and acts on behalf of the caller without re-evaluating their permissions.
This pattern creates an alternate control path where the same privileged action (resolving exec approvals) is exposed with weaker authorization requirements, leading to privilege escalation for users with only operator.write scope.
Potential impact
- Lower-privileged operators can approve or deny exec approvals they are not authorized to manage
- Unauthorized execution of sensitive commands or sessions gated by the approval workflow
- Bypass of change-control or production access policies enforced via exec approvals
- Potential lateral movement or expansion of operational access within production or sensitive environments
- Undermining of auditability and trust in approval logs, as actions appear formally approved despite broken authorization
General mitigation guidance
Effective mitigation typically focuses on centralizing and normalizing authorization checks across all entry points to sensitive operations:
- Ensure that all paths to
exec.approval.resolve(RPC, chat commands, UI, automation hooks) invoke the same authorization layer that enforcesoperator.approvals. - Avoid granting internal gateway clients blanket privileges that bypass per-user permission checks; instead, have gateways re-check the effective permissions of the originating user.
- Implement a consistent permission model for scopes such as
operator.writeandoperator.approvals, clarifying that approval resolution is a distinct, higher-privilege capability. - Prefer secure-by-default command routing patterns where new interfaces (chat/bot, CLI, UI) reuse existing service APIs instead of adding special privileged shortcuts.
- Apply the principle of least privilege to any internal service accounts or gateway identities that proxy user actions, limiting them to only what is strictly necessary.
How teams detect issues like this
Detection generally involves both code-level review and runtime monitoring:
- Static analysis & code review:
- Identify all call sites of
exec.approval.resolveand verify that each passes through a common authorization component. - Flag internal gateway or bot clients that perform privileged actions on behalf of users without re-checking user permissions or scopes.
- Review chat or command handlers (
/approve,/deny, etc.) for direct invocation of privileged RPCs or services. - Policy and configuration review:
- Examine permission mappings to ensure
operator.writedoes not implicitly confer approval rights. - Audit roles and scopes assigned to bot or integration accounts that can submit commands.
- Runtime and log analysis:
- Correlate approval resolution events with the scopes/roles of the initiating identities to detect patterns of approvals by accounts lacking
operator.approvals. - Use automated monitoring rules to alert when a non-approved role resolves exec approvals.
Automated code review or SAST tools can assist by enforcing rules that mandate centralized authorization checks for sensitive operations like approval resolution.

