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

CVE-2026-29610: OpenClaw: Command hijacking via unsafe PATH handling (bootstrapping + node-host PATH overrides)

highCVSS 4.0 7.7 · 3.1 8.8GHSA-jqpq-mgvm-f9r6

OpenClaw accepted untrusted PATH sources in two places: a project-local `node_modules/.bin` added to PATH at startup, and request-scoped `PATH` overrides sent to the node host's `system.run`. Either lets an attacker-planted binary run in place of a trusted command. Versions below 2026.2.14 are affected. Upgrade to 2026.2.14.

Published Feb 18, 2026 · Updated Mar 6, 2026 · Analysis Oct 31, 2026

What an attacker can do

There are two attack paths.

First, the node host. A caller who can invoke system.run on a connected node host can pass a request-scoped PATH. If the attacker can also place an executable earlier in that PATH, for example in a writable directory on the node host, with the name of an allowlisted safe-bin command, OpenClaw runs the attacker's file. This defeats the allowlist, so it matters only where allowlist or safe-bin rules are meant to limit execution. The advisory says this needs authorized access to an execution surface, such as a compromised gateway, and typically a misconfigured deployment. It is not unauthenticated internet RCE.

Second, local bootstrapping. If someone runs OpenClaw inside an attacker-controlled directory, such as a cloned malicious repository holding node_modules/.bin/openclaw and extra executables, OpenClaw put that directory on PATH. A later command run by name resolved to the attacker's file.

Both paths end in code execution as the OpenClaw user (CWE-78, CWE-427, CWE-807), with high confidentiality, integrity and availability impact.

Who is affected

The npm package openclaw below 2026.2.14. The node-host path matters if you run a node host that exposes system.run with allowlist or safe-bin controls. The local path matters if you launch OpenClaw from directories you did not create, such as freshly cloned repositories. Check:

npm ls -g openclaw
openclaw --version

openclaw

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

How to fix it

Upgrade to 2026.2.14, the patched version (commit 013e8f6):

npm install -g [email protected]

Project-local node_modules/.bin bootstrapping is now off by default. If you set OPENCLAW_ALLOW_PROJECT_LOCAL_BIN=1, the directory is appended to PATH and never prepended. The node host now ignores request-scoped PATH overrides, and its sanitizeEnv also blocks keys like PYTHONPATH and LD_PRELOAD. Leave the opt-in variable unset unless you trust the directory.

How to tell if you were hit

On node hosts, list writable directories that could serve as an earlier PATH entry, and look for executables there named like your allowlisted safe-bin commands, such as grep, head or tail. Review system.run requests that carry an env with PATH. For the local case, check repositories where OpenClaw was started for node_modules/.bin directories you did not install. Beam logs agent shell commands and file access, so an unexpected binary path in a recorded command would stand out.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Command hijacking via PATH handling

Discovered: 2026-02-04 Reporter: @akhmittra

Summary

OpenClaw previously accepted untrusted PATH sources in limited situations. In affected versions, this could cause OpenClaw to resolve and execute an unintended binary ("command hijacking") when running host commands.

This issue primarily matters when OpenClaw is relying on allowlist/safe-bin protections and expects PATH to be trustworthy.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Affected: < 2026.2.14
  • Patched: >= 2026.2.14 (planned next release)

What Is Required To Trigger This

A) Node Host PATH override (remote command hijack)

An attacker needs all of the following:

  • Authenticated/authorized access to an execution surface that can invoke node-host execution (for example, a compromised gateway or a caller that can issue system.run).
  • A node host connected and exposing system.run.
  • A configuration where allowlist/safe-bins are expected to restrict execution (this is not meaningful if full arbitrary exec is already allowed).
  • The ability to pass request-scoped environment overrides (specifically PATH) into system.run.
  • A way to place an attacker-controlled executable earlier in PATH (for example, a writable directory on the node host), with a name that matches an allowlisted/safe-bin command that OpenClaw will run.

Notes:

  • OpenClaw deployments commonly require a gateway token/password (or equivalent transport authentication). This should not be treated as unauthenticated Internet RCE.
  • This scenario typically depends on non-standard / misconfigured deployments (for example, granting untrusted parties access to invoke node-host execution or otherwise exposing a privileged execution surface beyond the intended trust boundary).

B) Project-local PATH bootstrapping (local command hijack)

An attacker needs all of the following:

  • The victim runs OpenClaw from within an attacker-controlled working directory (for example, cloning and running inside a malicious repository).
  • That directory contains a node_modules/.bin/openclaw and additional attacker-controlled executables in the same directory.
  • OpenClaw subsequently executes a command by name (resolved via PATH) that matches one of those attacker-controlled executables.

Fix

  • Project-local node_modules/.bin PATH bootstrapping is now disabled by default. If explicitly enabled, it is append-only (never prepended) via OPENCLAW_ALLOW_PROJECT_LOCAL_BIN=1.
  • Node Host now ignores request-scoped PATH overrides.

Fix Commit(s)

  • 013e8f6b3be3333a229a066eef26a45fec47ffcc

Thanks @akhmittra for reporting.

Credited to akhmittra.

Questions

Is CVE-2026-29610 unauthenticated remote code execution?

No. The advisory says the node-host path needs authorized access to an execution surface and typically a misconfigured deployment. The local path needs the victim to run OpenClaw in an attacker-controlled directory.

Does the upgrade change how project-local binaries work?

Yes. Project-local node_modules/.bin on PATH is off by default. OPENCLAW_ALLOW_PROJECT_LOCAL_BIN=1 turns it on, in append-only mode.

Which version fixes it?

2026.2.14. All earlier versions are affected.

Does the node host still accept PATH in requests?

No. After the fix it ignores request-scoped PATH overrides.

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