# CVE-2026-41294: OpenClaw has a CWD `.env` environment variable injection which bypasses host-env policy and allows config takeover

Source: https://junglewise.ai/threats/cve-2026-41294-openclaw-has-a-cwd-env-environment-variable-injection-which  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-21. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-41294 · Severity: critical · CVSS 9.6 · Published 2026-04-21

OpenClaw is a development tool that manages environment configuration and runtime settings. An attacker who can place a malicious .env file in a workspace or repository can override critical security settings and runtime configuration when OpenClaw starts in that directory, potentially leading to unauthorized access, data theft, or system compromise.

Technologies: [Openclaw](https://junglewise.ai/threats/technologies/openclaw). Vendors: [Openclaw](https://junglewise.ai/threats/vendors/openclaw).

## Quick answers

**Is CVE-2026-41294 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-41294 being exploited in the wild.

**How severe is CVE-2026-41294?** Critical severity, with a CVSS score of 9.6, published 21 April 2026.

**Which products and versions are affected?** Openclaw <= 2026.3.24.

**Is there a fix for CVE-2026-41294?** A patch was published on 2026-03-28: Version 2026.3.28 and later contain the fix Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-41294 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-41294?** Check whether you run Openclaw at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is an untrusted search path issue (CWE-426) in OpenClaw's dotenv loading logic. OpenClaw was loading environment variables from a .env file in the current working directory before applying trusted configuration from the state directory, allowing an attacker to inject malicious environment variables that override security-sensitive settings. The vulnerable components are src/infra/dotenv.ts and src/cli/dotenv.ts. Attack requires user interaction (the user must start OpenClaw in a directory containing the malicious .env file), but no authentication is needed. The fix, released in version 2026.3.28, filters untrusted CWD .env entries before startup (commit 6a79324802).

## Affected products

- OpenClaw OpenClaw <= 2026.3.24

## Identifiers

- CVE-2026-41294
- GHSA-8rh7-6779-cjqq

## Timeline

- 2026-04-01: disclosed
- 2026-03-28: patched: Version 2026.3.28 and later contain the fix
- 2026-03-25: other: Fix committed (commit 6a793248024dca7685f63bcceb64a0096fd1586d)

## References

- [https://github.com/openclaw/openclaw/security/advisories/GHSA-8rh7-6779-cjqq](https://github.com/openclaw/openclaw/security/advisories/GHSA-8rh7-6779-cjqq)
- [https://github.com/openclaw/openclaw/commit/6a793248024dca7685f63bcceb64a0096fd1586d](https://github.com/openclaw/openclaw/commit/6a793248024dca7685f63bcceb64a0096fd1586d)

## Related threats

- [OpenClaw incorrect authorization in mcp.app.view method](https://junglewise.ai/threats/cve-2026-102807-openclaw-before-2026-9-4-contains-an-incorrect-authorization)
- [OpenClaw incorrect authorization in Gateway media root allowlist](https://junglewise.ai/threats/cve-2026-102806-openclaw-before-2026-9-5-contains-an-incorrect-authorization)
- [OpenClaw exec approval bypass in Google Meet node commands](https://junglewise.ai/threats/cve-2026-100599-openclaw-versions-2026-5-1-through-2026-7-0-fail-to-apply-the)
- [OpenClaw Signal approval reaction binding logic error](https://junglewise.ai/threats/cve-2026-100598-openclaw-npm-package-openclaw-before-2026-7-1-incorrectly-binds)
- [OpenClaw time-of-check time-of-use race condition in filesystem operations](https://junglewise.ai/threats/cve-2026-100597-openclaw-npm-package-openclaw-before-2026-7-1-is-vulnerable-to-a)
