OpenClaw .env Vulnerability: Local File Can Hijack Config
The National Vulnerability Database has disclosed CVE-2026-41294, a high-severity vulnerability (CVSS 8.6) affecting OpenClaw before version 2026.3.28. This flaw stems from OpenClaw’s practice of loading .env files from the current working directory before processing trusted state-dir configurations. This creates a critical window for environment variable injection.
Attackers can exploit this by placing a specially crafted .env file within a repository or workspace. When OpenClaw starts up in that directory, the malicious .env file can override critical runtime configurations and security-sensitive environment settings. This effectively allows an attacker to dictate how the application operates, potentially leading to privilege escalation, data exfiltration, or complete system compromise. The vulnerability is tagged as CWE-15, indicating improper handling of environment variables.
Defenders must recognize the implications here: it’s an attack vector tied to project environments. If developers are pulling untrusted repositories or working in shared workspaces, this becomes a significant concern. The fix is straightforward: upgrade OpenClaw to version 2026.3.28 or later immediately to ensure trusted configurations are prioritized.
What This Means For You
- If your development or CI/CD pipelines use OpenClaw, immediately audit your environments. Ensure all OpenClaw instances are patched to version 2026.3.28 or higher to prevent `.env` file injection. Scrutinize any untrusted repositories or shared workspaces for malicious `.env` files that could hijack OpenClaw's startup configuration.
Related ATT&CK Techniques
🛡️ Detection Rules
3 rules · 6 SIEM formats3 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.
CVE-2026-41294 - OpenClaw Malicious .env File Loading
Indicators of Compromise
| ID | Type | Indicator |
|---|---|---|
| CVE-2026-41294 | Misconfiguration | OpenClaw software |
| CVE-2026-41294 | Misconfiguration | OpenClaw versions prior to 2026.3.28 |
| CVE-2026-41294 | Code Injection | Environment variable injection via .env file in current working directory |
Source & Attribution
| Source Platform | NVD |
| Channel | National Vulnerability Database |
| Published | April 21, 2026 at 03:16 UTC |
This content was AI-rewritten and enriched by Shimi's Cyber World based on the original source. All intellectual property rights remain with the original author.
Believe this infringes your rights? Submit a takedown request.