NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-41384: OpenClaw Has Incomplete Fix for CVE-2026-4039: CLI Backend Environment Variable Injection via Workspace Config

highCVSS 4.0 8.7 · 3.1 7.8GHSA-vfw7-6rhc-6xxg

OpenClaw's CLI backend runner let a workspace configuration control the environment variables of the backend process it spawns. A malicious repository or workspace could use this to run code or expose data when a user opens it. This is the incomplete fix for CVE-2026-4039. Versions up to 2026.3.23-2 are affected; fixed in 2026.3.24.

Published Apr 7, 2026 · Updated May 6, 2026 · Analysis Oct 30, 2026

What an attacker can do

When the CLI backend starts a process, it builds that process's environment. Before 2026.3.24, values from the workspace config flowed into it unfiltered. Environment variables can change what a spawned program loads and which binary it finds, so control over them can turn into code execution (CWE-15, with an untrusted search path, CWE-426).

The attacker needs to plant a crafted workspace config in a project the victim opens, such as a cloned repository. The CVSS 3.1 vector is local with user interaction required, and rates confidentiality, integrity and availability high. No privileges are needed. Anyone who opens untrusted repositories with OpenClaw is the target.

The maintainers' triage describes it as a real shipped malicious-workspace-config environment injection in the CLI backend runner. This entry follows an earlier fix for CVE-2026-4039 that did not cover this path. The sources do not name the variables or the config file involved.

Who is affected

The openclaw npm package up to and including 2026.3.23-2. The first stable tag with the fix is 2026.3.24. The latest version at the time of the advisory was 2026.3.31.

npm ls -g openclaw
openclaw --version

All installs that open workspaces from sources you do not control are in scope.

openclaw

Ecosystem
npm
Affected
<= 2026.3.23-2
Fixed in
2026.3.24
Check
npm ls openclaw

How to fix it

Upgrade to 2026.3.24 or later.

npm install -g openclaw@latest

The fix is commit c2fb7f1, which sanitizes the backend environment before the process is spawned. No workaround is documented. Until you upgrade, do not open untrusted repositories or workspaces with OpenClaw, and inspect workspace config files from third parties first.

How to tell if you were hit

Inspect workspace configuration files in repositories you opened with OpenClaw for environment settings you did not write, especially variables that alter loader behavior or PATH. Review process listings and shell history for backend processes that started with unexpected environment values or ran unexpected commands. Beam records agent shell commands and file access, and its rules can flag risky ones, which helps review what an opened workspace triggered.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

Incomplete Fix for CVE-2026-4039: CLI Backend Environment Variable Injection via Workspace Config

Current Maintainer Triage

  • Status: open
  • Normalized severity: high
  • Assessment: Real shipped malicious-workspace-config env injection in the CLI backend runner, fixed by sanitizing backend env before spawn and shipped in v2026.3.24, so advisory stays open until published.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Latest published npm version: 2026.3.31
  • Vulnerable version range: <=2026.3.23-2
  • Patched versions: >= 2026.3.24
  • First stable tag containing the fix: v2026.3.24

Fix Commit(s)

  • c2fb7f1948c3226732a630256b5179a60664ec24 — 2026-03-24T12:58:10-07:00

Release Process Note

  • The fix is already present in released version 2026.3.24.
  • This draft looks ready for final maintainer disposition or publication, not additional code-fix work.

Thanks @YLChen-007 for reporting.

Credited to YLChen-007.

Questions

How does CVE-2026-41384 relate to CVE-2026-4039?

The maintainers and the title describe this as an incomplete fix for CVE-2026-4039. The earlier fix left the workspace-config path to the CLI backend environment open.

Which version fixes it?

2026.3.24. Versions up to 2026.3.23-2 are affected.

Does it need user interaction?

Yes. The CVSS vector says a user must open the malicious workspace.

Is it exploited in the wild?

No source says so. The EPSS score is 0.0014.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More OpenClaw vulnerabilities

All OpenClaw entries