Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPlant malicious .env in workspace
-
DeliveryStage attacker-controlled runtime modules at chosen path
-
ExploitVictim opens workspace in OpenClaw
-
ExecutionOpenClaw reads STATE_DIRECTORY from .env
-
PersistRuntime resolves dependencies from attacker path
-
ImpactMalicious module executes as user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V13 - Configuration Search path verification
|
| Exploitation Conditions | Exploitation requires that the victim open or operate on an OpenClaw workspace whose .env file contains an attacker-controlled STATE_DIRECTORY value pointing at a location holding malicious runtime dependency files, and that OpenClaw is at a version prior to 2026.5.2 where this variable is honored without validation for bundled runtime dependency roots. Limiting factors confirmed by the CVSS 4.0 vector: the attack is local (AV:L), needs active user interaction (UI:A) such as opening the workspace, and carries an additional attack requirement (AT:P) - typically the planted .env plus a writable dependency path under attacker control - so it cannot be triggered remotely against a default, idle OpenClaw install. |
| Impact | The CVSS 4.0 vector (AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N) and score of 7.0 describe a local, user-interaction-dependent attack with an additional attack requirement (AT:P) - consistent with the description, where a victim must open or operate on a workspace whose .env was planted by the attacker. There is no EPSS score, KEV listing, or public POC in the provided intelligence, so real-world exploitation pressure appears low; however, the impact when triggered is high (confidentiality and integrity compromise via arbitrary code execution as the running user). The signals are internally consistent: this is a supply-chain/workspace-trust issue rather than a remotely exploitable RCE, and should be prioritized for environments where untrusted projects are routinely opened (developer workstations, CI runners) rather than treated as an internet-facing emergency. |
| Exploit ScenarioDerived | An attacker publishes or contributes a seemingly benign OpenClaw project whose .env sets STATE_DIRECTORY to a path under attacker-controlled content (e.g., a checked-in directory or a writable shared location). When a developer clones and opens the workspace in a vulnerable OpenClaw version, runtime dependency resolution loads modules from that path, executing the attacker's code as the developer. No public POC is referenced in the available data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 16, 2026
Untrusted search path in OpenClaw before 2026.5.2 allows local attackers who can influence a workspace .env file to redirect bundled runtime dependency loading to attacker-controlled paths, resulting in arbitrary code execution during dependency resolution. The STATE_DIRECTORY environment variable is not validated before being used to anchor runtime dependency roots, so a poisoned workspace can execute code in the context of a user who opens it. No public exploit identified at time of analysis, and the issue is not listed in CISA KEV.
RemediationAI
Vendor-released patch: upgrade OpenClaw to 2026.5.2 or later, which constrains how STATE_DIRECTORY is resolved for bundled runtime dependencies, per the GHSA at https://github.com/openclaw/openclaw/security/advisories/GHSA-wc84-j36w-pw4x. Until the upgrade can be applied, treat workspace .env files as untrusted input: do not open OpenClaw workspaces obtained from third parties, strip or override STATE_DIRECTORY from .env loading (accepting that projects relying on a custom state directory will break), and run OpenClaw under a least-privileged user account so any code executed during dependency resolution is contained. On shared developer or CI hosts, consider blocking write access to repository .env files from unprivileged automation and reviewing recently modified .env files for unexpected STATE_DIRECTORY entries; the trade-off is added friction for legitimate per-project configuration overrides.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OpenClaw is an open-source workspace/runtime tool that resolves bundled runtime dependencies relative to a state directory configured via the STATE_DIRECTORY environment variable, which can be supplied by a project's workspace .env file. The flaw maps to CWE-426 (Untrusted Search Path): because the runtime trusts a value loaded from in-workspace configuration, an attacker who controls that .env can point dependency lookup at arbitrary local paths containing malicious modules. The single CPE cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:*:*:* indicates the upstream OpenClaw application itself across all versions prior to 2026.5.2 is in scope, with no separate vendor distribution split.
Know when Openclaw gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Local workspace-trust flaw: attacker needs ability to write a .env in the victim's workspace (PR:L) and the victim must open it (UI:R); resulting code execution yields high C/I but no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 2 npm packages depend on openclaw (2 direct, 0 indirect)
Ecosystem-wide dependent count for version 2026.5.2.
Executive ViewAI
OpenClaw versions prior to 2026.5.2 expose development teams to arbitrary code execution through malicious workspace configuration files. When developers open a workspace with a poisoned .env file, improper path validation allows attackers to execute code with developer privileges, risking compromise of source code, credentials, and development infrastructure. This threat is particularly acute in organizations with shared workspaces or third-party code contributions.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Implement strict file permissions limiting .env write access to authorized personnel; (2) Require change review before .env file commits; (3) Monitor STATE_DIRECTORY environment variable configuration; (4) Isolate untrusted workspaces in sandboxed execution environments; (5) Disable automatic workspace loading and require explicit user approval.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Auth bypass in OpenClaw voice-call extension before 2026.2.1. EPSS 0.68%. PoC and patch available.
Privilege escalation in OpenClaw (pre-2026.3.28) allows unauthenticated remote attackers to gain administrative access b
OpenClaw versions 2026.2.22 through 2026.2.24 contain a privilege escalation vulnerability that allows authenticated att
An authorization mismatch vulnerability in OpenClaw versions prior to 2026.3.1 allows authenticated users with operator.
OpenClaw versions prior to 2026.1.29 automatically establish WebSocket connections to attacker-controlled gateway URLs e
Path traversal in OpenClaw through version 2026.3.23 enables unauthenticated remote attackers to read arbitrary files in
Authentication bypass in OpenClaw before 2026.5.3 allows remote attackers with low privileges to receive agent responses
Directory-context bypass in OpenClaw before 2026.8.1 allows authenticated attackers with user interaction to reuse an 'a
Unauthenticated access to the noVNC observer interface in OpenClaw's Docker sandbox browser allows anyone who can reach
Authentication bypass in OpenClaw's MCP loopback interface allows local low-privilege attackers to escalate to owner-lev
OpenClaw versions before 2026.2.26 allow authenticated attackers to write arbitrary files outside the workspace director
OpenClaw versions prior to 2026.2.22 contain a shell environment variable injection vulnerability in the system.run func
EUVD-2026-37160
GHSA-4qgr-57jq-93vh
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB