GHSA-8rh7-6779-cjqq

Suggest an improvement
Source
https://github.com/advisories/GHSA-8rh7-6779-cjqq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-8rh7-6779-cjqq/GHSA-8rh7-6779-cjqq.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-8rh7-6779-cjqq
Downstream
Published
2026-04-01T00:02:42Z
Modified
2026-04-01T00:19:47.988080Z
Severity
  • 9.6 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H CVSS Calculator
Summary
OpenClaw has a CWD `.env` environment variable injection which bypasses host-env policy and allows config takeover
Details

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).

Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-01T00:02:42Z",
    "severity": "CRITICAL",
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-426"
    ]
}
References

Affected packages

npm / openclaw

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2026.3.28

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-8rh7-6779-cjqq/GHSA-8rh7-6779-cjqq.json"
last_known_affected_version_range
"<= 2026.3.24"