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

CVE-2026-53846: OpenClaw: Workspace .env npm_execpath could influence bundled runtime dependency install

highCVSS 4.0 7.0 · 3.1 7.1GHSA-24vr-rprv-67rf

OpenClaw before 2026.4.29 lets a workspace `.env` file override `npm_execpath`, the package-manager executable path used by its helper that installs bundled runtime dependencies. A repository an operator opens can make the helper run an attacker-chosen program. Upgrade to openclaw 2026.4.29.

Published Jun 18, 2026 · Analysis Oct 25, 2026

What an attacker can do

npm_execpath is the environment variable that tells tools which package-manager script to run. OpenClaw's install helper for bundled runtime dependencies honored it, and in affected versions a .env in the opened workspace could set it. A hostile repository can ship a .env with npm_execpath pointing at a script it carries. When the operator triggers dependency setup, the helper executes that file in place of npm.

The attacker needs the operator to open their repository and then install bundled runtime dependencies. That matches the local vector with user interaction. The program runs as the operator's user, so it can read source code, SSH keys and cloud credentials, and change files. The advisory scopes this narrowly: it does not change the trusted-operator model, and the practical impact depends on configuration and whether lower-trust input can reach the install path. A sibling flaw, CVE-2026-53842, uses the same workspace .env trick through CLOUDSDK_PYTHON in Gmail setup.

Who is affected

The npm package openclaw before 2026.4.29, when bundled runtime dependencies are installed from a workspace that has a .env setting npm_execpath. Check:

npm ls -g openclaw

Also search the repositories you open for .env files that define npm_execpath.

openclaw

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

How to fix it

Upgrade to openclaw 2026.4.29, the first stable patched version.

npm install -g [email protected]

Until then, the advisory says to install bundled runtime dependencies only from trusted workspaces. Its general hardening advice is narrow channel and tool allowlists, no sharing of one Gateway between mutually untrusted users, and disabling features you don't need.

How to tell if you were hit

Grep workspaces for npm_execpath in .env files. Check process logs for the dependency install helper starting an executable that is not your normal npm or its npm-cli.js. Review recent installs for child processes that made network calls or touched credential files. Beam records agent shell commands and file access, so a .env write or an unexpected installer process spawned from an agent session can be traced there.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

Workspace .env npm_execpath could influence bundled runtime dependency install. In affected versions, a workspace .env in a repository opened by a trusted operator could override the package-manager executable path used by the install helper.

This advisory is scoped to the named feature and configuration. It does not change OpenClaw's trusted-operator model: authenticated Gateway operators, installed plugins, and intentional local execution surfaces remain trusted unless a separate policy, approval, allowlist, sandbox, or auth boundary is crossed.

Impact

When the affected feature is enabled and reachable, this could run an unintended local package-manager executable during dependency setup. Practical impact depends on the operator's configuration and whether lower-trust input can reach that path.

Patched Versions

The first stable patched version is 2026.4.29.

Mitigations

install bundled runtime dependencies from trusted workspaces until patched. As general hardening, keep channel and tool allowlists narrow, avoid sharing one Gateway between mutually untrusted users, and disable the affected feature when it is not needed.

Credited to feynman-hou.

Questions

What does npm_execpath control?

It names the package-manager executable the install helper runs. A workspace .env could replace it, so the helper ran an attacker's program during dependency setup.

Which OpenClaw version fixes CVE-2026-53846?

2026.4.29. All earlier releases are listed as vulnerable.

Does the attacker need a Gateway login?

No login is needed. They need the operator to open a repository containing the .env and run the dependency install. The vector is local with user interaction.

Is it exploited in the wild?

No source reports exploitation, and it is not in CISA's KEV catalog.

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