Mar 3, 2026·4 min read·24 visits
OpenClaw versions before 2026.2.25 contain a UI spoofing vulnerability in the `system.run` approval flow. Attackers can execute binaries with trailing whitespace in their names while displaying a clean, benign command to the user for approval.
A critical vulnerability in the OpenClaw AI assistant allows attackers to bypass execution approval mechanisms. Due to a discrepancy between how commands are displayed to the user and how they are executed by the system, an attacker can trick a user into approving a malicious binary execution under the guise of a benign command. This issue affects the `system.run` tool and allows for arbitrary code execution if the attacker can influence the AI agent's tool calls.
OpenClaw is a personal AI assistant capable of interacting with the local operating system through the system.run tool. To maintain security, sensitive actions—specifically shell command executions—require explicit user confirmation. The system presents the proposed command to the user, who must approve it before execution proceeds.
This vulnerability, identified as GHSA-HWPQ-RRPF-PGCQ, represents a bypass of this approval mechanism. It exploits a logic error in how command arguments are normalized for display versus how they are passed to the execution engine. Consequently, the command string shown in the approval prompt may differ semantically from the command actually executed by the underlying operating system. This allows an attacker (via prompt injection or a compromised agent instruction) to execute arbitrary binaries that the user believes are harmless system utilities.
The root cause of this vulnerability is a CWE-290: Authentication Bypass by Spoofing, specifically caused by an "identity mismatch" between the presentation layer and the execution layer.
When the OpenClaw agent constructs a command, it passes an array of arguments (argv). The approval system previously generated a user-facing string from this array to display in the UI. During this generation, the system performed "lossy" normalization, specifically trimming whitespace from tokens to improve readability. However, the actual execution logic passed the raw, un-normalized argv array to the child_process or equivalent system call.
This created a discrepancy: a token like 'runner ' (with a trailing space) would be rendered as 'runner' in the UI. If a file named 'runner ' existed on the system, the OS would execute that specific binary, while the user would believe they were authorizing the standard 'runner' utility. The system failed to bind the approval to the exact cryptographic or byte-for-byte identity of the argument vector.
The vulnerability resided in src/gateway/node-invoke-system-run-approval.ts and the formatting logic in src/infra/system-run-command.ts. The fix introduces strict "Argv Identity Binding".
Vulnerable Logic (Conceptual):
Previously, the validation checked if the rendered command string matched the approved string. This was insufficient because multiple argv configurations could map to the same rendered string.
Patched Logic:
The fix, implemented in version 2026.2.25, adds a strict element-wise comparison of the requested argv against the approved argv. The following code snippet from the patch demonstrates the new validation step:
// src/gateway/node-invoke-system-run-approval.ts
// New validation ensures the exact array structure matches
if (requestedArgv) {
// Fail if lengths differ
if (requestedArgv.length === 0 || requestedArgv.length !== argv.length) {
return false;
}
// Strict comparison of every token
for (let i = 0; i < requestedArgv.length; i += 1) {
if (requestedArgv[i] !== argv[i]) {
return false;
}
}
}Additionally, the formatExecCommand utility was updated to stop trimming whitespace and instead wrap tokens containing whitespace in quotes. This ensures that if an agent requests 'runner ', the UI explicitly displays '"runner "', alerting the user to the anomaly.
To exploit this vulnerability, an attacker requires the ability to influence the OpenClaw agent's tool calls (e.g., via prompt injection) and the ability to place a file on the victim's filesystem (or identify an existing binary with a trailing space in its name).
"safe_tool " (note the trailing space) in a directory within the system PATH.argv as ['safe_tool ', '-v'].Allow execution of: safe_tool -v.safe_tool as a legitimate utility, approves the request. The system executes the raw argv[0], which is "safe_tool ", triggering the malicious payload.This vulnerability has a High severity (CVSS 7.2) because it completely undermines the integrity of the human-in-the-loop security model OpenClaw relies on.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H indicates that while high privileges (control over agent instructions) and user interaction are required, the impact on Confidentiality, Integrity, and Availability is total relative to the user's context.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
openclaw OpenClaw | < 2026.2.25 | 2026.2.25 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-290 |
| Attack Vector | Network (Agent Instruction) |
| CVSS | 7.2 (High) |
| Impact | Arbitrary Code Execution |
| Exploit Status | PoC Available |
| Vendor | OpenClaw |
Authentication Bypass by Spoofing
A state persistence vulnerability exists in Tornado's CurlAsyncHTTPClient component where pooled pycurl.Curl handles are reused across asynchronous requests without a complete state reset. Consequently, sensitive per-request configurations, such as client TLS certificates or proxy basic authentication credentials, persist on the shared handle. This behavior leads to subsequent requests leaking these credentials to unauthorized remote servers.
CVE-2026-48748 is a denial-of-service vulnerability in Netty's HTTP/3 codec (netty-codec-http3) occurring when QPACK dynamic tables are enabled but the blocked streams limit is not explicitly configured. A bug in limit checking and a memory leak in stream tracking allow unauthenticated remote attackers to exhaust the JVM heap memory and crash the server.
CVE-2026-50009 is a cryptographic design vulnerability in the Netty network application framework. Prior to version 4.2.15.Final, the framework's QUIC protocol implementation fails to cryptographically segregate the generated Connection IDs and the associated Stateless Reset Tokens. An on-path network attacker who sniffs traffic during a Connection ID rotation can extract secret token material from cleartext headers, enabling them to inject spoofed reset packets and terminate active connections.
A critical hostname verification bypass vulnerability exists in the Netty network application framework when configured as a TLS client. When a developer registers a custom plain X509TrustManager, Netty wraps it inside an X509TrustManagerWrapper to adapt it to the X509ExtendedTrustManager API. However, this wrapper discards the SSLEngine context, bypassing critical hostname checks. Because the wrapper is identified as an X509ExtendedTrustManager, standard cryptographic engines and Netty's OpenSSL wrappers do not re-wrap it, failing to execute any hostname validation. Consequently, clients silently accept certificates for any host, enabling unauthenticated Man-in-the-Middle (MitM) attacks.
An uncontrolled resource pre-allocation flaw in the Netty Redis codec module allows remote unauthenticated attackers to cause a denial of service (OutOfMemoryError) by sending a crafted Redis Serialization Protocol (RESP) array header.
CVE-2026-50020 is a medium-severity HTTP Request Smuggling/Response Smuggling vulnerability (CWE-444) within the Netty asynchronous network application framework. The flaw resides in Netty's HTTP codec implementation, specifically the HttpObjectDecoder class, which silently consumes arbitrary ISO control bytes preceding the first request line.