DEV Community

CVE Reports
CVE Reports

Posted on • Originally published at cvereports.com

GHSA-HXVM-XJVF-93F3: GHSA-HXVM-XJVF-93F3: Arbitrary Code Execution via Insecure Environment Variable Loading in OpenClaw

GHSA-HXVM-XJVF-93F3: Arbitrary Code Execution via Insecure Environment Variable Loading in OpenClaw

Vulnerability ID: GHSA-HXVM-XJVF-93F3
CVSS Score: 7.8
Published: 2026-04-25

OpenClaw versions prior to 2026.4.20 are vulnerable to arbitrary code execution due to insecure handling of workspace-local .env files. The application fails to restrict the entire OPENCLAW_ namespace, allowing untrusted repositories to override critical internal control variables.

TL;DR

Untrusted workspace .env files can override OpenClaw internal variables, leading to arbitrary code execution. Users must upgrade to version 2026.4.20.


⚠️ Exploit Status: POC

Technical Details

  • Attack Vector: Local / User Interaction
  • Impact: Arbitrary Code Execution
  • CWE ID: CWE-829
  • Exploit Status: Proof of Concept
  • Patched Version: 2026.4.20

Affected Systems

  • OpenClaw npm package (< 2026.4.20)
  • openclaw: < 2026.4.20 (Fixed in: 2026.4.20)

Code Analysis

Commit: 018494f

Security/dotenv: block all OPENCLAW_* keys from untrusted workspace .env files

Mitigation Strategies

  • Update OpenClaw to version 2026.4.20 or later.
  • Manually inspect workspace-local .env files for variables beginning with the OPENCLAW_ prefix.
  • Avoid opening untrusted repositories or workspaces with OpenClaw.

Remediation Steps:

  1. Identify the currently installed version of OpenClaw using npm list -g openclaw.
  2. If the version is prior to 2026.4.20, run npm install -g openclaw@latest.
  3. Verify the successful installation of the patched version.
  4. Implement static analysis rules to flag malicious .env keys in code repositories.

References


Read the full report for GHSA-HXVM-XJVF-93F3 on our website for more details including interactive diagrams and full exploit analysis.

Top comments (0)