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-2XCP-X87W-Q377

GHSA-2xcp-x87w-q377: Incorrect Authorization Bypass via Templated Hook Mappings in OpenClaw

Alon Barad
Alon Barad
Software Engineer

Apr 26, 2026·7 min read·44 visits

Executive Summary (TL;DR)

OpenClaw versions prior to 2026.4.20 fail to enforce the session key opt-in security policy when processing templated hook mappings. Attackers can exploit this by sending crafted webhook payloads that resolve to unauthorized session keys, resulting in session hijacking and information disclosure.

The OpenClaw personal AI assistant framework contains an incorrect authorization vulnerability within its webhook routing logic. An architectural flaw in the processing of hook mapping templates allows external webhook payloads to resolve to arbitrary session keys. This effectively bypasses the framework's 'allowRequestSessionKey' security gate, enabling unauthorized users to hijack sessions, inject messages, and access cross-session data.

Vulnerability Overview

The OpenClaw framework incorporates a webhook gateway designed to route incoming requests to specific AI agents and active sessions. This routing behavior is governed by 'hook mappings' configured within the application. These mappings determine the target sessionKey for an incoming webhook, either by specifying a static string or by defining a dynamic template, such as {{payload.id}}, which resolves based on the incoming request data.

The framework implements a security gate named allowRequestSessionKey to prevent external requests from arbitrarily assigning themselves to existing sessions. By default, this configuration is set to false, ensuring that external callers cannot dictate session routing. The vulnerability, tracked as CWE-863 (Incorrect Authorization), exists because the gateway logic applies this security gate inconsistently.

Prior to version 2026.4.20, the gateway only enforced the allowRequestSessionKey policy when a session key was provided explicitly within the standard request payload structure. The system entirely bypassed this check when the session key was resolved indirectly through a hook mapping template. This permitted external webhook payloads to influence session routing despite the secure default configuration.

The flaw affects all installations of the openclaw NPM package prior to version 2026.4.20. Implementations relying on built-in routing presets, such as the Gmail integration which uses per-message routing templates by default, are particularly exposed. Administrators running these configurations are vulnerable to session hijacking unless explicit prefix restrictions were manually applied.

Root Cause Analysis

The core engineering flaw resides in the lack of origin tracking during the hook mapping resolution phase. The routing logic treated all configurations defined within hooks.mappings as internally trusted data structures. When the gateway processed an incoming webhook, it did not distinguish between a static session key hardcoded by the administrator and a dynamic session key populated by untrusted external input.

The templating engine renders dynamic expressions like {{payload.id}} by substituting the template variables with corresponding values extracted from the incoming HTTP request. Once the template rendering process completes, the system forwards the resulting sessionKey to the resolveHookSessionKey function. At this execution stage, the function receives a plain string without any metadata indicating how the string was constructed.

Within the resolveHookSessionKey function, the logic evaluated the authorization policy based on an inaccurate source categorization. Because the key originated from the hooks.mappings configuration object, the source was tagged generically as mapping. The authorization gate explicitly exempted the mapping source from the allowRequestSessionKey validation check, operating under the false assumption that all mapping values were statically defined by administrators.

This architectural oversight created a direct bypass of the intended security boundaries. Untrusted external input successfully mutated into a trusted internal routing directive. The resulting authorization failure permitted an attacker to inject data into any session key they could derive through the templated expression.

Code Analysis and Patch Verification

The remediation strategy, introduced in commit 5275d008ed33203dba3f98e969ad683a65c416c3, addresses the vulnerability by implementing explicit origin tracking for session keys. The patch modifies the mapping generation logic to analyze the template structure before rendering. This ensures the system retains the necessary context regarding the data's provenance.

In src/gateway/hooks-mapping.ts, the developer introduced a new tracking field named sessionKeySource. The updated buildActionFromMapping function now evaluates the raw mapping configuration using a new helper function, getSessionKeyTemplateSource. This function statically analyzes the configuration string to determine if it contains template syntax, returning templated if variable substitution is required, and static otherwise.

function buildActionFromMapping(mapping, ctx) {
  return {
    // ...
    sessionKey: renderOptional(mapping.sessionKey, ctx),
    sessionKeySource: getSessionKeyTemplateSource(mapping.sessionKey), // Origin tracking introduced
    // ...
  };
}

The most critical component of the patch resides in src/gateway/hooks.ts. The resolveHookSessionKey function incorporates the new origin tracking metadata into its authorization logic. The check now logically blocks session keys originating from either a direct request or a mapping-templated source unless the administrator explicitly sets the allowRequestSessionKey policy to true.

export function resolveHookSessionKey(params) {
  if (requested) {
    // The authorization gate now explicitly restricts templated mappings
    if (
      (params.source === "request" || params.source === "mapping-templated") && 
      !params.hooksConfig.sessionPolicy.allowRequestSessionKey
    ) {
      return { ok: false, error: "sessionKey is disabled for externally supplied hook payload values..." };
    }
    // ...
  }
}

Exploitation Methodology

Exploitation requires the attacker to identify an exposed OpenClaw webhook endpoint that relies on templated hook mappings. The attacker must also understand the expected JSON schema of the incoming webhook payload, specifically the fields referenced by the target's routing template. No authentication is necessary if the webhook endpoint is exposed publicly.

The attacker constructs a malicious JSON payload where the specific field referenced by the {{ ... }} template contains the identifier of a target session. For example, if the mapping template is defined as {{messages[0].id}}, the attacker crafts an HTTP POST request containing a messages array where the first object's id equals the victim's active session key.

Upon receiving the request, the OpenClaw gateway parses the payload and applies the hook mapping. The templating engine substitutes the malicious input into the sessionKey variable. Due to the lack of origin tracking, the resolveHookSessionKey function approves the routing directive. The gateway subsequently routes the attacker's payload into the victim's session.

Impact Assessment

The primary impact of this vulnerability is unauthorized session hijacking. By successfully routing malicious payloads to arbitrary session keys, an attacker can directly inject instructions, queries, or manipulated data into active AI sessions belonging to other users. This capability compromises the integrity of the AI assistant's interactions.

Information disclosure represents a critical secondary consequence. When an attacker forces a webhook payload into a targeted session, the OpenClaw framework processes the input within that specific context. The resulting AI responses, which may contain sensitive context from the victim's ongoing session, are processed as part of the hijacked interaction flow. Depending on the specific webhook implementation, this output may be returned or forwarded to an attacker-controlled endpoint.

The flaw entirely neutralizes the framework's primary defense-in-depth mechanism. The allowRequestSessionKey: false default configuration is designed to guarantee session isolation against untrusted external inputs. The failure of this control renders environments utilizing dynamic mappings inherently vulnerable, elevating the overall risk profile of the deployment.

Remediation and Configuration Requirements

The definitive remediation strategy is upgrading the openclaw NPM package to version 2026.4.20 or later. This release contains the updated origin tracking logic and strictly enforces the authorization gates for templated mappings. Administrators must verify the package version across all production deployments and continuous integration pipelines.

Following the upgrade, environments utilizing templated sessionKey mappings will experience a functional change. The gateway will actively reject incoming webhooks unless two specific configuration prerequisites are satisfied. Administrators must explicitly set hooks.allowRequestSessionKey to true and define strict routing boundaries within the hooks.allowedSessionKeyPrefixes array.

Organizations unable to immediately apply the patch must implement strict configuration workarounds. Administrators must remove all templated variable expressions ({{ ... }}) from hooks.mappings[].sessionKey configurations. Alternatively, if dynamic routing is strictly required, operators should block external access to the webhook gateway at the reverse proxy or network load balancer level until the software upgrade is complete.

Official Patches

OpenClawOfficial patch implementing session key origin tracking

Fix Analysis (1)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS Probability
0.01%
Top 88% most exploited

Affected Systems

OpenClaw FrameworkOpenClaw Webhook Gateway

Affected Versions Detail

Product
Affected Versions
Fixed Version
openclaw
OpenClaw
< 2026.4.202026.4.20
AttributeDetail
CWE IDCWE-863: Incorrect Authorization
Attack VectorNetwork (Unauthenticated)
CVSS v3.1 Score5.3 (Medium)
ImpactSession Hijacking, Information Disclosure
Exploit MaturityProof of Concept (PoC)
Affected Packageopenclaw (NPM)

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1566Phishing
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

Official Patch EvidenceThe patch commit includes test cases demonstrating that template-derived session keys bypassed the security gate prior to the fix.

Vulnerability Timeline

Fix commit 5275d00 pushed to openclaw repository.
2026-04-21
Security advisory GHSA-2xcp-x87w-q377 published.
2026-04-26
OpenClaw version 2026.4.20 released addressing the vulnerability.
2026-04-26

References & Sources

  • [1]GitHub Advisory: GHSA-2xcp-x87w-q377
  • [2]Repository Advisory
  • [3]Fix Commit 5275d008ed33203dba3f98e969ad683a65c416c3
  • [4]OpenClaw Changelog

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.

More Reports

•2 days ago•CVE-2026-65973
6.4

CVE-2026-65973: Local OS Command Injection in Laradocs KaTeX Server-Side Rendering

CVE-2026-65973 (GHSA-h746-qpxh-ph7g) is a local operating system command injection vulnerability (CWE-78) in the PeteBishwhip/laradocs package for Laravel. Versions from 0.4.0 to before 1.0.0 fail to sanitize or escape the configured Node.js binary path before passing it as part of a command string to PHP's proc_open() function during server-side KaTeX rendering. An attacker with the ability to modify local configuration files or environment variables can inject shell metacharacters to execute arbitrary OS commands under the privileges of the web server process.

Amit Schendel
Amit Schendel
16 views•9 min read
•3 days ago•CVE-2026-65971
7.6

CVE-2026-65971: SQL Injection in Livewire PowerGrid via Public sortDirection Property

A SQL injection vulnerability exists in power-components/livewire-powergrid versions 6.0.0 through 6.10.3. The public Livewire component property sortDirection is interpolated directly into raw SQL ORDER BY clauses during natural sorting operations without prior validation. By clearing the sortField property to bypass standard Laravel query builder protections, an attacker can inject arbitrary SQL expressions via POST requests to the /livewire/update endpoint.

Amit Schendel
Amit Schendel
13 views•9 min read
•3 days ago•CVE-2026-68539
7.5

CVE-2026-68539: Unbounded Resource Consumption and Denial of Service in Fulgur CSS GCPM string-set Processing

CVE-2026-68539 is a remote Denial of Service (DoS) vulnerability in Fulgur, a Rust-based offline HTML/CSS-to-PDF rendering engine. Prior to version 0.29.0, the engine's CSS Generated Content for Paged Media (GCPM) implementation resolved and stored named strings via the string-set property without enforcing memory caps or caching DOM subtree text extraction. An unauthenticated attacker supplying crafted HTML and CSS to a rendering endpoint can trigger multi-gigabyte heap memory allocations and redundant O(M * L) subtree traversals, leading to CPU starvation and out-of-memory (OOM) process aborts.

Alon Barad
Alon Barad
14 views•10 min read
•3 days ago•CVE-2026-64670
9.3

CVE-2026-64670: Stored Cross-Site Scripting in @waline/client Comment Editor Preview

A stored cross-site scripting (XSS) vulnerability in @waline/client allows unauthenticated attackers to execute arbitrary JavaScript in the context of an administrator's browser session. The flaw exists because the client-side markdown preview renderer utilizes the marked library without HTML sanitization and injects the resulting output directly into the DOM via Vue's v-html directive. When an administrator opens the edit interface for a comment, the preview element is mounted and evaluated immediately due to the combination of watchImmediate and v-show, leading to automatic payload execution and administrative token compromise.

Amit Schendel
Amit Schendel
15 views•8 min read
•3 days ago•CVE-2026-63304
8.1

CVE-2026-63304: OS Command Injection in WWBN AVideo via listFFmpegProcesses

WWBN AVideo versions through 29.0 contain an OS command injection vulnerability (CWE-78) in the standalone API utility function listFFmpegProcesses(). The function constructs a shell pipeline to monitor active FFmpeg processes by interpolating a user-controlled keyword parameter directly into a single-quoted grep argument without sanitization or shell escaping. An attacker capable of crafting or submitting a valid encrypted codeToExec payload can break out of the single-quoted argument context and execute arbitrary operating system commands with the privileges of the web server user.

Alon Barad
Alon Barad
11 views•9 min read
•3 days ago•CVE-2026-59726
10.0

CVE-2026-59726: Unauthenticated Remote Code Execution in Ruflo MCP Bridge

Ruflo versions prior to 3.16.3 expose the Model Context Protocol (MCP) bridge HTTP endpoints (`POST /mcp` and `POST /mcp/:group`) on all network interfaces (`0.0.0.0:3001`) without authentication. Because the primary JSON-RPC tool dispatcher (`executeTool()`) bypasses existing tool blocklists, an unauthenticated network attacker can invoke the `terminal_execute` tool to achieve arbitrary command execution inside the bridge container. This initial access permits full exfiltration of third-party LLM provider API keys, unauthorized access to the co-located MongoDB instance, and manipulation of the AgentDB learning store.

Alon Barad
Alon Barad
20 views•2 min read