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-53858

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

Alon Barad
Alon Barad
Software Engineer

Jun 19, 2026·7 min read·21 visits

Executive Summary (TL;DR)

OpenClaw prior to 2026.5.2 loads critical system state paths from untrusted workspace `.env` files, enabling local code execution through dependency path hijacking.

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.

Vulnerability Overview

OpenClaw is an application platform utilizing a trusted-operator design pattern. This architecture assumes that operators with execution boundaries and plugin management privileges are trusted security actors. However, when operators clone and open external repositories, the attack surface expands to include local configuration files present within the workspace directory.

The vulnerability identified as CVE-2026-53858 is an instance of an untrusted search path vulnerability, classified as CWE-426. The vulnerability occurs during the early parsing phase when OpenClaw opens a new repository or workspace. During this phase, the application processes environment variables defined in local configuration files without proper verification.

By manipulating the STATE_DIRECTORY variable within a repository-specific configuration file, an attacker can override system-defined runtime pathways. This redirection forces the application to load bundled dependencies from the specified local directory rather than the secure, system-defined system state directory. The resulting outcome is arbitrary code execution under the security privileges of the active operator.

Root Cause Analysis

The root cause of the flaw lies in the premature evaluation of workspace-level configuration variables before establishing secure runtime boundaries. When an operator loads a workspace, OpenClaw immediately reads and parses the repository's .env file to set up the development context. This parsing routine does not distinguish between user-defined application variables and critical system environment variables.

Specifically, the STATE_DIRECTORY environment variable dictates the directory structure where OpenClaw expects its core execution states and bundled runtime dependencies. When the application engine initializes its dependency resolver, it queries this parsed environment variable to locate its modules. Because the configuration loading process is not isolated, the workspace-level .env file successfully overrides this critical system-level path.

The application subsequently utilizes this unvalidated path to resolve and dynamically import Javascript modules. In Node.js environments, standard module resolution or file system search patterns will traverse the specified folder to find the target modules. This behavior completes the untrusted search path condition, as the application searches an arbitrary directory provided by an external, untrusted source.

Code Analysis

The vulnerable path relies on an insecure configuration loader that merges workspace-level .env properties directly into the global process environment. In the vulnerable version, the environment parser reads the local file and applies all key-value pairs directly to process.env without filtering. Below is a representation of the vulnerable configuration sequence:

// Vulnerable configuration sequence in OpenClaw (< 2026.5.2)
const dotenv = require('dotenv');
const path = require('path');
 
function initializeWorkspace(workspacePath) {
    // Vulnerability: Reads local workspace .env and merges it into process.env
    dotenv.config({ path: path.join(workspacePath, '.env') });
    
    // Resolves the state path directly from process.env with no validation
    const stateDir = process.env.STATE_DIRECTORY || '/var/lib/openclaw';
    
    // Loads dynamic libraries from the unvalidated state directory
    const dependencyRoot = path.resolve(stateDir, 'deps');
    const coreRuntime = require(path.join(dependencyRoot, 'runtime.js'));
    coreRuntime.init();
}

In the patched version (2026.5.2), the application introduces an environment variable blocklist and enforces strict isolation of system configuration parameters. Workspace configuration files are parsed into a separate, isolated object, and critical keys such as STATE_DIRECTORY are stripped before any environment merging occurs.

// Patched configuration sequence in OpenClaw (2026.5.2)
const dotenv = require('dotenv');
const path = require('path');
const fs = require('fs');
 
const SYSTEM_BLOCKED_VARS = ['STATE_DIRECTORY', 'NODE_OPTIONS', 'PATH'];
 
function initializeWorkspaceSecure(workspacePath) {
    const envPath = path.join(workspacePath, '.env');
    if (fs.existsSync(envPath)) {
        const parsedEnv = dotenv.parse(fs.readFileSync(envPath));
        
        // Mitigation: Filter out system-critical environment variables
        for (const key of Object.keys(parsedEnv)) {
            if (!SYSTEM_BLOCKED_VARS.includes(key)) {
                process.env[key] = parsedEnv[key];
            } 
        }
    }
    
    // Resolves the state path strictly from secure system environment or defaults
    const stateDir = process.env.STATE_DIRECTORY || '/var/lib/openclaw';
    const dependencyRoot = path.resolve(stateDir, 'deps');
    
    // Ensures load path resolves within a trusted system directory
    const coreRuntime = require(path.join(dependencyRoot, 'runtime.js'));
    coreRuntime.init();
}

The patch successfully prevents workspace-level files from manipulating the runtime path. However, security teams must note that other environment-dependent loaders within the application could still be susceptible to similar overrides if third-party configuration libraries are introduced. Complete remediation requires continuous auditing of all path-building operations that rely on external variables.

Exploitation Methodology

Exploiting this vulnerability requires an operator to actively open an untrusted repository containing a crafted directory structure and a malicious .env file. The attack payload consists of two primary components: a configuration file setting the STATE_DIRECTORY variable, and a nested directory structure mirroring the expected dependency structure. Below is a structural representation of the exploit delivery:

The attacker defines the STATE_DIRECTORY variable to point to a relative path within the repository, such as ./attacker_libs. Inside this folder, the attacker places a file at deps/runtime.js containing arbitrary JavaScript code. When the victim clones and opens the workspace within OpenClaw, the configuration parser reads the .env file, updates the process environment, and immediately triggers the loading mechanism.

Because the application attempts to resolve runtime.js via the manipulated path, it loads the attacker's script from ./attacker_libs/deps/runtime.js. The payload executes under the same user privileges and system access rights as the active OpenClaw operator process. This bypasses typical access control lists and permits unauthenticated local code execution on the operator's machine.

Impact Assessment

The impact of successful exploitation is complete system compromise within the execution context of the OpenClaw operator. Since many operators run these environments with high privileges or within development networks, the execution of arbitrary commands provides a beachhead for lateral movement. The attacker can extract environment secrets, steal access tokens, or modify source code files.

The vulnerability is evaluated with a CVSS v4.0 base score of 7.0 and a CVSS v3.1 score of 7.1. The severity is marked as High because it requires minimal complexity and no special administrative permissions to execute. However, user interaction is a strict prerequisite, as the operator must consciously open the malicious directory.

While there are currently no known public exploits or evidence of active exploitation in the wild, the ease of crafting a payload makes this a highly viable vector for targeted supply-chain attacks. The EPSS score remains low at 0.00124, reflecting the lack of public tooling, but organizations should prioritize remediation to secure internal development environments.

Remediation & Mitigation

The primary and recommended mitigation is upgrading the OpenClaw installation to version 2026.5.2 or later. This release enforces strict validation on environment variables loaded from workspace directories, preventing the overriding of sensitive system-level paths. Systems should be configured to automatically apply patches for core development and runtime utilities.

If immediate patching is not feasible, operators must implement defensive workarounds. One critical workaround is to disable the automatic loading of workspace-level environment configurations in the system preferences. Operators should also manually inspect any .env files in external repositories for variables like STATE_DIRECTORY before opening them.

Additionally, security teams can implement file integrity monitoring and static analysis rules to flag hazardous configurations. Network isolation policies should also be applied to operator workspaces to restrict outbound connections from development platforms, mitigating the impact of code execution by preventing the exfiltration of credentials or the establishment of reverse shells.

Official Patches

OpenClawOpenClaw Official Repository

Technical Appendix

CVSS Score
7.1/ 10
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
EPSS Probability
0.12%
Top 98% most exploited

Affected Systems

OpenClaw (npm package 'openclaw') running on developer or operator workspaces

Affected Versions Detail

Product
Affected Versions
Fixed Version
openclaw
OpenClaw
< 2026.5.22026.5.2
AttributeDetail
CWE IDCWE-426 (Untrusted Search Path)
Attack VectorLocal (L)
CVSS v3.1 Score7.1 (High)
EPSS Score0.00124 (Percentile: 2.46%)
ImpactLocal Code Execution (LCE)
Exploit StatusNone (No public exploit/PoC available)
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1574.009Hijack Execution Flow: Path Interception
Persistence, Privilege Escalation, Defense Evasion
T1574Hijack Execution Flow
Persistence, Privilege Escalation, Defense Evasion
CWE-426
Untrusted Search Path

The application uses an external path or environment variable to search for critical resources without adequately validating the path's integrity.

Vulnerability Timeline

CVE published by VulnCheck
2026-06-16
OSV records GitHub Advisory and updates mapping
2026-06-18

References & Sources

  • [1]GitHub Security Advisory GHSA-wc84-j36w-pw4x
  • [2]VulnCheck Security Advisory
  • [3]CVE.org Official Record
  • [4]NVD Official Record

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-16454
4.3

CVE-2026-16454: Object-Level Authorization Bypass in Eclipse hawkBit Direct Device Integration Controller

CVE-2026-16454 is an object-level authorization bypass vulnerability (CWE-284, CWE-862) in Eclipse hawkBit versions 1.0.3 and prior. The flaw exists within the Direct Device Integration (DDI) REST controller (hawkbit-ddi-resource), where endpoints responsible for enumerating software module metadata and serving firmware binaries fail to verify whether the requested software module is assigned to the authenticated device. Consequently, any device with valid credentials (such as a TargetToken or GatewayToken) can enumerate software module identifiers and download arbitrary firmware artifacts across the entire tenant namespace.

Amit Schendel
Amit Schendel
10 views•9 min read
•2 days ago•CVE-2026-62284
8.6

CVE-2026-62284: Remote Code Execution and SSRF via Unsanitized Kubeconfig in OSAC Operator

CVE-2026-62284 (GHSA-5w5g-j6hw-6p8f) is a code injection and server-side request forgery vulnerability in the console-proxy component of the OSAC Operator. The RemoteConfigResolver parses Kubernetes Secrets containing kubeconfig files via clientcmd.RESTConfigFromKubeConfig without sanitizing execution-related fields. An attacker with RBAC permissions to create or modify labeled Secrets in monitored namespaces can supply a malicious exec credential plugin, resulting in arbitrary command execution within the console-proxy pod.

Amit Schendel
Amit Schendel
8 views•8 min read
•2 days ago•CVE-2026-62361
5.5

CVE-2026-62361: Authenticated SQL Injection and Table Access Control Bypass in Listmonk Subscriber Export

CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).

Alon Barad
Alon Barad
10 views•11 min read
•2 days ago•CVE-2026-28385
5.0

CVE-2026-28385: Server-Side Request Forgery in Canonical LXD Image Import

CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.

Amit Schendel
Amit Schendel
10 views•9 min read
•2 days ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
8 views•12 min read
•2 days ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
8 views•9 min read