Description
OpenClaw before 2026.5.2 contains an environment variable injection vulnerability where workspace .env STATE_DIRECTORY could influence bundled runtime dependency roots. Attackers can manipulate the STATE_DIRECTORY variable to load runtime dependencies from unintended local paths, potentially executing malicious code during dependency resolution.
Published: 2026-06-16
Score: 7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

OpenClaw versions prior to 2026.5.2 contain an environment variable injection flaw in the workspace .env file, where the STATE_DIRECTORY variable can influence the locations from which bundled runtime dependencies are loaded. Attackers who can set or modify this variable may cause OpenClaw to resolve dependencies from unintended local paths, potentially leading to execution of malicious code during the dependency resolution phase. The primary impact is remote or local code execution within the OpenClaw process, giving an attacker control over the application and its environment.

Affected Systems

The Vendor OpenClaw, Product OpenClaw, is affected for all releases before 2026.5.2. Any deployment of OpenClaw built with a legacy version is vulnerable to the exploitation described above.

Risk and Exploitability

The CVSS score of 7 indicates a high severity vulnerability. The EPSS score of less than 1% suggests that exploitation is currently unlikely but not impossible; the risk may increase if an attacker gains the ability to set the STATE_DIRECTORY environment variable in a vulnerable environment. The vulnerability is not listed in the CISA KEV catalog, so no mass exploitation has yet been recorded. The likely attack vector is through control of the environment for a user or process that runs OpenClaw, which could be gained through compromised credentials or by affecting configuration files in a shared workspace.

Generated by OpenCVE AI on June 17, 2026 at 21:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade OpenClaw to version 2026.5.2 or later.
  • Remove or neutralize the STATE_DIRECTORY environment variable from the workspace .env file, ensuring it is not set or is set to a safe, trusted path.
  • Configure OpenClaw to validate and restrict dependency lookup directories, ensuring that only trusted paths are used during runtime dependency resolution.

Generated by OpenCVE AI on June 17, 2026 at 21:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-wc84-j36w-pw4x OpenClaw: Workspace .env STATE_DIRECTORY could influence bundled runtime dependency roots
History

Thu, 18 Jun 2026 16:45:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 16 Jun 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 16 Jun 2026 18:30:00 +0000

Type Values Removed Values Added
Description OpenClaw before 2026.5.2 contains an environment variable injection vulnerability where workspace .env STATE_DIRECTORY could influence bundled runtime dependency roots. Attackers can manipulate the STATE_DIRECTORY variable to load runtime dependencies from unintended local paths, potentially executing malicious code during dependency resolution.
Title OpenClaw < 2026.5.2 - Arbitrary Runtime Dependency Loading via STATE_DIRECTORY Environment Variable
First Time appeared Openclaw
Openclaw openclaw
Weaknesses CWE-426
CPEs cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:node.js:*:*
Vendors & Products Openclaw
Openclaw openclaw
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N'}

cvssV4_0

{'score': 7, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

Openclaw Openclaw
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-06-18T14:23:46.567Z

Reserved: 2026-06-10T21:22:34.480Z

Link: CVE-2026-53858

cve-icon Vulnrichment

Updated: 2026-06-16T18:53:00.844Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-06-16T19:17:03.310

Modified: 2026-06-16T20:42:46.200

Link: CVE-2026-53858

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-17T21:30:12Z

Weaknesses