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

CVE-2026-44114: OpenClaw: Workspace dotenv could override runtime-control environment variables

highCVSS 4.0 8.5 · 3.1 7.8GHSA-hxvm-xjvf-93f3

OpenClaw before 2026.4.20 lets a workspace .env file set OPENCLAW_ runtime-control variables such as OPENCLAW_GIT_DIR. Running OpenClaw in a malicious repository can then steer source-update or installer flows. Upgrade to openclaw 2026.4.20, which blocks every OPENCLAW_ key from workspace dotenv files.

Published Apr 25, 2026 · Updated May 12, 2026 · Analysis Nov 5, 2026

What an attacker can do

OpenClaw loads a .env file from the workspace. Its blocklist, BLOCKED_WORKSPACE_DOTENV_PREFIXES in src/infra/dotenv.ts, covered only a few narrow prefixes: OPENCLAW_CLAWHUB_, OPENCLAW_DISABLE_ and OPENCLAW_SKIP_. Other runtime-control variables passed through. A repository could ship a .env that sets OPENCLAW_GIT_DIR before a source-update or installer flow runs, which can point trusted OpenClaw behavior at attacker-chosen locations.

The attacker needs the user to run OpenClaw from an attacker-controlled workspace, for example a cloned repository. That is the user-interaction step in the CVSS vector. The vector rates confidentiality, integrity and availability impact high on the local machine. The advisory itself calls the severity medium and gives no exact exploit chain, so the high rating reflects the worst case of steering trusted runtime code.

The commit's test list names OPENCLAW_GIT_DIR, OPENCLAW_WORKSPACE_DIR, OPENCLAW_MDNS_HOSTNAME and OPENCLAW_SESSION_CACHE_TTL_MS as keys that must now be blocked.

Who is affected

The npm package openclaw before 2026.4.20. The risk arises when you start OpenClaw inside a workspace you did not create, one that contains a .env file.

npm ls openclaw

openclaw

Ecosystem
npm
Affected
< 2026.4.20
Fixed in
2026.4.20
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.4.20 or later:

npm install -g [email protected]

The fix (commit 018494fa) adds the OPENCLAW_ prefix to the workspace dotenv blocklist, so any current or future OpenClaw runtime-control key in a workspace .env is rejected. Set such variables in your shell or global config instead. The advisory lists no other workaround. Until you upgrade, do not run OpenClaw in untrusted repositories.

How to tell if you were hit

Open the .env file in any repository you ran OpenClaw in and look for OPENCLAW_ keys, especially OPENCLAW_GIT_DIR or OPENCLAW_WORKSPACE_DIR pointing outside the project. Check whether OpenClaw's update or install flow ran from that workspace and where it fetched code. Compare the running install against the expected package source.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Affected Packages / Versions

  • Package: openclaw (npm)
  • Affected versions: < 2026.4.20
  • Patched version: 2026.4.20

Impact

Workspace .env loading did not reserve the OPENCLAW_ runtime-control namespace broadly enough. A malicious workspace could set variables such as OPENCLAW_GIT_DIR before source-update or installer flows, potentially steering trusted OpenClaw runtime behavior.

This requires running OpenClaw from an attacker-controlled workspace. Severity is medium.

Fix

OpenClaw now reserves the workspace OPENCLAW_ environment namespace and rejects workspace dotenv entries for OpenClaw runtime-control variables.

Fix commit:

  • 018494fa3ebb9145112e68b56fe1cb2e9f9a9ed6

Release

Fixed in OpenClaw 2026.4.20.

Credited to foodlook.

Questions

Does CVE-2026-44114 need user interaction?

Yes. The user must run OpenClaw from a workspace the attacker controls, such as a cloned repository that has a malicious .env.

Why is a medium-severity advisory scored high?

The advisory text says medium. The CVSS vector scores high because steering trusted runtime flows could affect confidentiality, integrity and availability locally.

Which variables are now blocked?

Every key beginning with OPENCLAW_ in a workspace .env file.

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