OpenClaw
CVE-2026-41294
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconDeliver malicious repository
-
DeliveryUser clones to local system
-
ExploitUser navigates to repository directory
-
InstallUser launches OpenClaw from compromised CWD
-
C2Application loads malicious .env file
-
ExecuteOverride security-sensitive environment variables
-
ImpactExecute with attacker-controlled configuration
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration Configuration hardening
|
| Exploitation Conditions | Exploitation requires the victim to launch OpenClaw from a directory containing an attacker-placed .env file. Specific prerequisite: user must execute OpenClaw with current working directory set to an attacker-controlled path, typically by cloning a malicious repository, extracting a malicious archive, or navigating to a compromised shared directory before launching the application. The CVSS vector confirms no privileges required (PR:N) but mandatory user interaction (UI:P)-the victim must actively start OpenClaw in the compromised location. Limiting factors that reduce realistic risk: (1) Local attack vector (AV:L) requires prior access to user's filesystem or successful social engineering to deliver malicious files; (2) User interaction requirement (UI:P) means automated exploitation is not possible; (3) Attack targets development/workspace scenarios rather than default system installations; (4) Scope unchanged (SC:N) indicates impact limited to OpenClaw process context, not spreading to other system components without additional exploitation. Organizations where users do not launch OpenClaw from untrusted directories face minimal risk despite the high CVSS score. |
| Impact | CVSS 8.5 (High) reflects high confidentiality, integrity, and availability impact (VC:H/VI:H/VA:H) with local attack vector (AV:L), low complexity (AC:L), no privileges required (PR:N), and user interaction required (UI:P). However, real-world exploitation risk is constrained by multiple factors. EPSS score of 0.01% (percentile 2%) indicates extremely low observed exploitation probability, consistent with SSVC assessment showing no current exploitation and non-automatable attack. Attack requires social engineering to trick users into launching OpenClaw from attacker-controlled directories-not a default scenario. The local attack vector (AV:L) significantly reduces exposure compared to network-exploitable vulnerabilities. CISA SSVC total technical impact rating acknowledges potential for complete system compromise if exploited, but the combination of user interaction requirement, local vector, and 2nd-percentile EPSS score positions this as a supply chain hygiene issue rather than an imminent mass-exploitation threat. Primary risk scenarios involve targeted attacks against developers using OpenClaw in untrusted repositories or social engineering campaigns distributing malicious project files. The high CVSS score reflects worst-case impact, not likelihood-this is a medium-priority issue for organizations using OpenClaw, requiring awareness and process changes rather than emergency patching. |
| Exploit ScenarioDerived | An attacker distributes a malicious Git repository containing a crafted .env file that overrides OpenClaw's security settings, such as disabling authentication checks, redirecting logging to attacker-controlled servers, or injecting malicious paths into library search variables. When a developer clones the repository and launches OpenClaw from that directory to analyze or build the project, OpenClaw loads the malicious .env file before its trusted configuration, applying the attacker's environment variables. The attacker gains control over OpenClaw's runtime behavior, potentially exfiltrating sensitive data, executing arbitrary code through manipulated library paths, or bypassing security controls-all without requiring elevated privileges or exploiting code vulnerabilities. Public advisory from VulnCheck describes this attack mechanism, reducing research burden for potential attackers. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Apr 21, 2026
OpenClaw versions before 2026.3.28 allow local attackers to inject malicious environment variables by placing a .env file in the current working directory, which is loaded before trusted state-directory configuration during application startup. This enables attackers to override security-sensitive runtime settings without privileges, achieving high confidentiality, integrity, and availability impact with low complexity when a user launches OpenClaw from a compromised directory. Exploitation probability is minimal (EPSS 0.01%, percentile 2%) with no active exploitation confirmed (not in CISA KEV), but a public advisory from VulnCheck describes the attack mechanism, making exploitation straightforward for local threat actors.
Earlier versions of this analysis (1)
Environment variable injection in OpenClaw before 2026.3.28 allows local attackers to override security-sensitive runtime configuration by placing a malicious .env file in a user's working directory. When users clone untrusted repositories or open workspace directories containing crafted .env files, OpenClaw loads these environment variables before applying trusted state-directory configuration, enabling arbitrary configuration override. No public exploit identified at time of analysis, though the attack vector relies on social engineering to get victims to operate in attacker-controlled directories.
RemediationAI
Upgrade to OpenClaw version 2026.3.28 or later, which addresses the configuration file precedence issue by loading trusted state-directory settings before processing current working directory .env files. The patch is available from the official OpenClaw GitHub repository per security advisory GHSA-8rh7-6779-cjqq. Until patching is complete, implement these compensating controls with their trade-offs: (1) Launch OpenClaw only from trusted directories outside user-controlled workspaces-reduces productivity for developers who need to work in project directories; (2) Configure file system monitoring to alert on .env file creation in common working directories-generates operational overhead and may produce false positives; (3) Use read-only mounting for untrusted repositories when reviewing third-party code-prevents normal development workflows requiring file modification; (4) Implement mandatory code review for .env files in all cloned repositories before launching OpenClaw-adds manual review burden to development process. Organizations should also educate users about workspace-based attacks and establish secure directory policies for running development tools. Review and audit existing .env files in OpenClaw working directories for unauthorized modifications.
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 stems from improper handling of .env configuration file precedence (CWE-15: External Control of System or Configuration Setting). OpenClaw loads environment variables from a .env file in the current working directory before processing its trusted state-directory configuration. Environment variable injection attacks exploit application trust in externally-controlled configuration sources. In this case, the application's search path prioritizes user-controlled directories over secure system directories, violating the principle of secure defaults. When users clone malicious repositories or navigate to attacker-controlled directories before launching OpenClaw, the untrusted .env file is processed during initialization, allowing arbitrary environment variable manipulation. This pattern commonly affects containerized applications, development tools, and CLI utilities that use .env files for configuration management, and represents a broader class of supply chain and workspace-based attacks.
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:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
2DescriptionCVE.org
OpenClaw before 2026.3.28 loads the current working directory .env file before trusted state-dir configuration, allowing environment variable injection. Attackers can place a malicious .env file in a repository or workspace to override runtime configuration and security-sensitive environment settings during OpenClaw startup.
Blast Radius
ecosystem impact- 3 npm packages depend on openclaw (3 direct, 0 indirect)
Ecosystem-wide dependent count for version 2026.3.28.
Executive ViewAI
OpenClaw versions prior to 2026.3.28 contain an environment variable injection vulnerability that allows local attackers to override security-sensitive runtime configurations through malicious .env files placed in workspace directories. This poses a significant risk to development teams who work with untrusted code repositories or open-source projects, as attackers can manipulate application behavior without requiring elevated privileges or authentication. Organizations using OpenClaw should immediately restrict use of the product with untrusted repositories until patching is available.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) restrict OpenClaw usage to internally-maintained repositories only; (2) implement file integrity monitoring to detect unauthorized .env files in project directories; (3) enforce code review policies requiring manual inspection of repository contents before opening in OpenClaw; (4) use containerized or sandboxed development environments to limit scope of environment variable injection; (5) disable automatic .env loading in OpenClaw configuration where supported by product settings.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
Related Vulnerabilities in OpenClaw Multiple Authorization and Security Flaws
View all 14Auth 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
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
OpenClaw versions prior to 2026.2.22 contain a resource exhaustion vulnerability where the application fails to consiste
GHSA-8rh7-6779-cjqq
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB