CVE-2026-41294: Openclaw OpenClaw Has A CWD `.env` Vulnerability

CRITICAL
Advisory Identifier: GHSA-8rh7-6779-cjqq
CVSS 9.6
CWE-426
Published
Advisory Summary

CVE-2026-41294 is a CRITICAL (CVSS 9.6) openclaw has a cwd `.env` vulnerability (CWE-426: Untrusted Search Path) affecting Openclaw libraries in the npm ecosystem. The issue involves openclaw has a cwd `.env` environment variable injection which bypasses host-env policy and allows config takeover. Remediation is available by upgrading affected packages to version 2026.3.28.

CVE-2026-41294 at a Glance

CVE Identifier CVE-2026-41294
GHSA Identifier GHSA-8rh7-6779-cjqq
Severity CRITICAL
CVSS v3.1 Base Score 9.6
CWE Classification CWE-426: Untrusted Search Path
Affected Product Openclaw
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-41294

To remediate this vulnerability, upgrade all affected Openclaw dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

openclaw fixed: 2026.3.28
npm install openclaw@2026.3.28
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls openclaw

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-41294, inspect your project dependencies using npm:

npm ls openclaw

Analyze the terminal output to locate any version of Openclaw in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2026.3.28), your application is affected.

Note: The npm ls openclaw command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-426: Untrusted Search Path, where the product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control. In Openclaw, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary OpenClaw loaded the current working directory `.env` before trusted state-dir configuration, allowing untrusted workspace state to inject host environment values. ## Impact A repository or workspace containing a malicious `.env` file could override runtime configuration and security-sensitive environment settings when OpenClaw started there. ## Affected Component `src/infra/dotenv.ts, src/cli/dotenv.ts` ## Fixed Versions - Affected: `<= 2026.3.24` - Patched: `>= 2026.3.28` - Latest stable `2026.3.28` contains the fix. ## Fix Fixed by commit `6a79324802` (`Filter untrusted CWD .env entries before OpenClaw startup`).

CVE-2026-41294 Affected Openclaw Versions

1 component(s)
Fixed Versions:
2026.3.28
Product / Package Ecosystem Affected Versions Fixed Version
openclaw
npm
< 2026.3.28
2026.3.28

References

Frequently Asked Questions

What is CVE-2026-41294?
CVE-2026-41294 is a security vulnerability in Openclaw involving OpenClaw has a CWD `.env` environment variable injection which bypasses host-env policy and allows config takeover under CWE-426: Untrusted Search Path.
Which Openclaw versions are affected?
Affected versions include releases prior to 2026.3.28 across affected packages: openclaw.
What version fixes CVE-2026-41294?
Upgrading to 2026.3.28 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openclaw affected?
Yes, openclaw is affected in releases prior to 2026.3.28. Upgrade your dependency to 2026.3.28 or later.
What is the CVSS score of CVE-2026-41294?
CVE-2026-41294 has a CVSS v3.1 base score of 9.6 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-41294?
CVE-2026-41294 is classified under CWE-426: Untrusted Search Path (The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.).
How can I check npm dependencies for CVE-2026-41294?
Run the dependency tree command: 'npm ls openclaw'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8rh7-6779-cjqq",
  "modified" : "2026-04-20T23:43:42Z",
  "published" : "2026-04-01T00:02:42Z",
  "aliases" : [ "CVE-2026-41294" ],
  "summary" : "OpenClaw has a CWD `.env` environment variable injection which bypasses host-env policy and allows config takeover",
  "details" : "## Summary\n\nOpenClaw loaded the current working directory `.env` before trusted state-dir configuration, allowing untrusted workspace state to inject host environment values.\n\n## Impact\n\nA repository or workspace containing a malicious `.env` file could override runtime configuration and security-sensitive environment settings when OpenClaw started there.\n\n## Affected Component\n\n`src/infra/dotenv.ts, src/cli/dotenv.ts`\n\n## Fixed Versions\n\n- Affected: `<= 2026.3.24`\n- Patched: `>= 2026.3.28`\n- Latest stable `2026.3.28` contains the fix.\n\n## Fix\n\nFixed by commit `6a79324802` (`Filter untrusted CWD .env entries before OpenClaw startup`).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "openclaw"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2026.3.28"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2026.3.24"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/security/advisories/GHSA-8rh7-6779-cjqq"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/commit/6a793248024dca7685f63bcceb64a0096fd1586d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openclaw/openclaw"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/releases/tag/v2026.3.28"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-426" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-01T00:02:42Z",
    "nvd_published_at" : null
  }
}