---
id: CVE-2026-53858
title: >-
  OpenClaw: Workspace .env STATE_DIRECTORY could influence bundled runtime
  dependency roots
summary: >-
  OpenClaw: Workspace .env STATE_DIRECTORY could influence bundled runtime
  dependency roots
severity: high
cvss: 7.1
cwe:
  - CWE-426
vendor: openclaw
product: openclaw
affected:
  - openclaw < 2026.5.2
patched:
  - openclaw 2026.5.2
published: '2026-06-18'
updated: '2026-06-18'
source: GHSA
sourceUrl: 'https://github.com/advisories/GHSA-wc84-j36w-pw4x'
references:
  - url: >-
      https://github.com/openclaw/openclaw/security/advisories/GHSA-wc84-j36w-pw4x
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-53858'
  - url: >-
      https://www.vulncheck.com/advisories/openclaw-arbitrary-runtime-dependency-loading-via-state-directory-environment-variable
  - url: 'https://github.com/advisories/GHSA-wc84-j36w-pw4x'
tags:
  - ghsa
  - npm
epss: 0.00184
epssPercentile: 0.07089
ingestedAt: '2026-06-19T03:39:00.772Z'
ecosystem: npm
---

## Overview

### Summary

Workspace .env STATE_DIRECTORY could influence bundled runtime dependency roots. In affected versions, a workspace `.env` in a repository opened by a trusted operator could set `STATE_DIRECTORY` before runtime dependency root resolution.

This advisory is scoped to the named feature and configuration. It does not change OpenClaw's trusted-operator model: authenticated Gateway operators, installed plugins, and intentional local execution surfaces remain trusted unless a separate policy, approval, allowlist, sandbox, or auth boundary is crossed.

### Impact

When the affected feature is enabled and reachable, this could load bundled runtime dependencies from an unintended local state path. Practical impact depends on the operator's configuration and whether lower-trust input can reach that path.

### Patched Versions

The first stable patched version is `2026.5.2`.

### Mitigations

avoid opening untrusted workspace env files before runtime dependency installation until patched. As general hardening, keep channel and tool allowlists narrow, avoid sharing one Gateway between mutually untrusted users, and disable the affected feature when it is not needed.

## Affected packages

- `openclaw < 2026.5.2`

## Remediation

Upgrade to a patched release:

- `openclaw 2026.5.2`
