CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-HFPR-JHPQ-X4RM
6.5

GHSA-HFPR-JHPQ-X4RM: Authorization Bypass via Gateway Command Routing in OpenClaw

Alon Barad
Alon Barad
Software Engineer

Mar 9, 2026·6 min read·4 visits

PoC Available

Executive Summary (TL;DR)

Authenticated attackers with limited `operator.write` permissions can bypass scope restrictions using the `chat.send` gateway method to execute administrative `/config` commands, altering system settings and enabling administrative tools.

OpenClaw versions prior to v2026.3.7 contain a moderate-severity authorization bypass vulnerability (CWE-863). The flaw allows authenticated clients restricted to the `operator.write` scope to perform administrative configuration changes by abusing the `chat.send` gateway protocol. This failure in internal message channel processing leads to unauthorized modifications of the system configuration and potential privilege escalation.

Vulnerability Overview

OpenClaw functions as an open-source AI agent infrastructure platform, utilizing a role-based access control system to govern interactions. Access to the platform's API and gateway interfaces is managed via OAuth-style scopes. The operator.admin scope is required for destructive or configuration-altering actions, while the operator.write scope is intended strictly for basic messaging and standard interaction features.

The vulnerability, identified as GHSA-HFPR-JHPQ-X4RM, resides in the gateway protocol's internal message routing logic. Clients authenticate to the OpenClaw gateway using their assigned scopes. However, the system fails to correctly enforce these boundaries when processing slash commands submitted via the chat.send interface. This allows an entity with minimal permissions to invoke administrative routines.

By encapsulating an administrative command within a standard chat payload, an attacker circumvents the direct API access controls. The gateway processes the internal message, identifies the command directive, and executes it without re-validating the caller's privilege level against the specific action's requirements. This results in an incorrect authorization state mapping to CWE-863 and CWE-285.

Root Cause Analysis

The fundamental flaw exists in the architectural divergence between direct RPC method calls and internal gateway command processing. OpenClaw exposes direct RPC endpoints for administrative tasks, which correctly interrogate the authorization context to verify the presence of the operator.admin scope. A direct API call to modify the configuration reliably rejects requests lacking this permission.

Conversely, the platform implements a chat.send interface designed for natural language interactions and slash-command processing. When a user submits a message such as /config set tools.bash.enabled=true, the gateway intercepts the input, parses the directive, and routes it to an internal command handler. Prior to version 2026.3.7, the handler located in src/auto-reply/reply/commands-config.ts validated only that the command subsystem was globally enabled.

The internal command processor neglected to verify the contextual scopes of the original chat.send requestor before enacting state changes. It operated under the flawed assumption that any command reaching the internal execution phase was inherently authorized. This omission created a parallel execution path where authorization checks were entirely bypassed for destructive configuration actions like set and unset.

Exploitation Methodology

Exploitation requires the attacker to possess valid credentials mapping to the operator.write scope. These credentials establish an authenticated session with the OpenClaw gateway. The attacker does not require administrative access, network positioning beyond the standard API gateway, or complex memory manipulation techniques.

The attacker initiates the exploit sequence by submitting a specially crafted payload via the chat.send protocol. The payload body contains a slash command targeting the configuration subsystem. A standard attack string resembles /config set tools.bash.enabled=true. The attacker sends this string exactly as they would send a legitimate chat message to the agent.

Upon receiving the payload, the OpenClaw gateway extracts the /config directive and routes it to the vulnerable command handler. The handler processes the mutation request, overwriting the specified key-value pair in the underlying openclaw.json configuration file. The platform acknowledges the modification and updates its operational state dynamically without requiring a restart.

Once the configuration is altered, the attacker leverages the newly enabled features. In the case of enabling the bash tool, the attacker utilizes standard platform functionality to execute arbitrary shell commands on the underlying host infrastructure. This completes the privilege escalation lifecycle from a restricted messaging user to a system-level actor.

Impact Assessment

The primary consequence of this vulnerability is the complete compromise of the platform's configuration integrity. An attacker with restricted operator.write privileges acquires the ability to arbitrarily alter the contents of openclaw.json. This configuration file dictates the operational parameters, security constraints, and active feature sets of the OpenClaw environment.

The secondary impact involves privilege escalation to remote code execution. By modifying specific configuration keys, such as enabling disabled tools or overriding security limits, the attacker weaponizes native application features. Enabling shell-execution plugins directly translates the authorization bypass into unauthenticated, host-level command execution within the context of the OpenClaw service account.

This vulnerability also affects related operational workflows, similar to the previously disclosed CVE-2026-28473. By manipulating the configuration, attackers alter approval hierarchies, disable auditing mechanisms, or modify persistent data stores. The blast radius encompasses both the application layer and the underlying host system, bounded only by the permissions of the OpenClaw process itself.

Code Analysis and Patch Review

The remediation, introduced in commit 5f8f58ae25e2a78f31b06edcf26532d634ca554e, fundamentally alters the authorization architecture for internal command processing. The maintainers introduced a specialized helper function named requireGatewayClientScopeForInternalChannel within src/auto-reply/reply/command-gates.ts. This function extracts the GatewayClientScopes context directly from the incoming message envelope.

// Patched logic in command-gates.ts
export function requireGatewayClientScopeForInternalChannel(context: Context, requiredScope: string) {
  const scopes = context.get(GatewayClientScopes);
  if (!scopes || !scopes.includes(requiredScope)) {
    throw new UnauthorizedError(`Missing required scope: ${requiredScope}`);
  }
}

The patch integrates this helper into the vulnerable /config handler located in src/auto-reply/reply/commands-config.ts. The developer implemented conditional logic to differentiate between read-only actions and destructive mutations. If the parsed action evaluates to set or unset, the handler immediately invokes the scope check, requiring operator.admin.

// Patched logic in commands-config.ts
if (action === 'set' || action === 'unset') {
  requireGatewayClientScopeForInternalChannel(context, 'operator.admin');
  // Proceed with configuration mutation
}
// Read-only 'show' actions proceed without admin scope

This implementation successfully resolves the vulnerability by ensuring the gateway command parser enforces the same authorization requirements as the direct RPC interface. The decision to leave /config show accessible to operator.write preserves intended functionality for restricted users without compromising security. The patch also standardizes this gating mechanism across other sensitive commands, including /approve, addressing variant analysis.

Remediation and Mitigation

The official resolution for GHSA-HFPR-JHPQ-X4RM is the installation of OpenClaw version 2026.3.7. Administrators must update affected deployments immediately to close the authorization bypass vector. The patch applies structural changes to the command routing logic and cannot be replicated via standard configuration toggles.

Prior to upgrading, organizations can deploy temporary mitigation strategies if immediate patching is unfeasible. Administrators should review the assigned scopes for all active gateway clients and revoke operator.write access from untrusted or unverified entities. Limiting network access to the OpenClaw gateway interface using strict firewall rules or mutually authenticated TLS (mTLS) minimizes the external attack surface.

Post-incident response procedures require a thorough audit of the openclaw.json configuration file. Security teams must verify that no unauthorized modifications occurred, paying specific attention to enabled tools, plugin states, and approval workflows. Discrepancies necessitate an investigation into active gateway sessions and potential credential rotation for compromised client identities.

Official Patches

OpenClawOfficial fix commit implementing internal channel scope verification.
OpenClawRelease notes and binaries for version 2026.3.7.

Fix Analysis (1)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N

Affected Systems

OpenClaw Gateway ProtocolOpenClaw Internal Command Router

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenClaw
OpenClaw
< 2026.3.72026.3.7
AttributeDetail
CWE IDCWE-863 / CWE-285
Attack VectorNetwork (Authenticated)
ImpactPrivilege Escalation / Configuration Modification
Exploit StatusProof of Concept (PoC) Available
Required PrivilegesLow (operator.write)
Affected Componentchat.send handler

MITRE ATT&CK Mapping

T1548Abuse Elevation Control Mechanism
Privilege Escalation
T1078Valid Accounts
Initial Access
CWE-863
Incorrect Authorization

The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.

Known Exploits & Detection

Internal Test SuitesProof of concept exists within the project's internal testing mechanisms.

Vulnerability Timeline

Vulnerability reported by @tdjackey.
2026-03-07
Fix commit 5f8f58ae25e2a78f31b06edcf26532d634ca554e pushed to repository.
2026-03-07
OpenClaw v2026.3.7 released.
2026-03-07
GHSA-HFPR-JHPQ-X4RM published by Peter Steinberger (@steipete).
2026-03-07

References & Sources

  • [1]GitHub Advisory: GHSA-hfpr-jhpq-x4rm
  • [2]OpenClaw Security Policy
  • [3]Fix Commit 5f8f58ae25e2a78f31b06edcf26532d634ca554e
  • [4]OpenClaw v2026.3.7 Release
Related Vulnerabilities
CVE-2026-28473

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.