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

GHSA-98ch-45wp-ch47: OpenClaw: Windows-compatible env override keys could bypass system.run approval binding

mediumCVSS 4.0 6.9

OpenClaw 2026.4.1 and earlier left some Windows-style environment override keys, such as ProgramFiles(x86), out of the system.run approval binding while still passing them to the command. An approved command could run with environment values nobody approved. Upgrade to 2026.4.2.

Published Apr 7, 2026 · Analysis Oct 30, 2026

What an attacker can do

When an operator approves a system.run request, OpenClaw binds the approval to the command and a hash of its environment overrides. The binding code in src/infra/system-run-approval-binding.ts normalized override keys with the portable rules (normalizeEnvVarKey with portable: true), which drop keys that contain characters like parentheses. The execution path used the host-override rules, which keep them.

So a request could carry an override like ProgramFiles(x86)=C:\attacker. The approval showed and hashed no such key, the operator approved the command, and the host then ran it with that variable set. Changing the value later did not invalidate the approval either.

The attacker needs to shape the request that gets approved, for example through a prompt-injected agent proposing a command. They cannot add a new command, but they can change what an approved command loads or where it looks for programs. The advisory calls the result an approval-integrity gap. Windows hosts that use system.run approvals are the exposed group.

Who is affected

openclaw on npm, version 2026.4.1 and earlier, for host-exec flows that use system.run approvals, mainly on Windows hosts. Check the installed version:

npm ls openclaw

Use npm ls -g openclaw for a global install.

openclaw

Ecosystem
npm
Affected
<= 2026.4.1
Fixed in
2026.4.2
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.4.2 or later:

npm install [email protected]

Commit 7eb094a00d80e9f6bf0e62f2c45d3b88ff67c04d makes the approval binding use the same host-override key normalizer as execution. It also fails closed with APPROVAL_ENV_BINDING_MISSING when environment keys are present but no hash was bound. A changed value now returns APPROVAL_ENV_MISMATCH. The advisory lists no workaround.

How to tell if you were hit

Review stored system.run approvals and exec logs for commands on Windows hosts that ran with environment overrides whose names contain parentheses, such as ProgramFiles(x86). After upgrading, a rejected request shows the error codes APPROVAL_ENV_MISMATCH or APPROVAL_ENV_BINDING_MISSING. Beam records the shell commands an agent runs, including their environment, which can show an approved command that ran with unexpected overrides.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

Before OpenClaw 2026.4.2, system-run approval binding normalized environment override keys differently from host execution. Windows-compatible keys could be omitted from the approval binding while still being injected at execution time.

Impact

An approved command could run with attacker-chosen environment overrides that were not represented in the approval binding. This created an approval-integrity gap for affected host-exec flows.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Affected versions: <= 2026.4.1
  • Patched versions: >= 2026.4.2
  • Latest published npm version: 2026.4.1

Fix Commit(s)

  • 7eb094a00d80e9f6bf0e62f2c45d3b88ff67c04d — align approval binding with execution-time env-key normalization

Release Process Note

The fix is present on main and is staged for OpenClaw 2026.4.2. Publish this advisory after the 2026.4.2 npm release is live.

Thanks @iskindar for reporting, and thanks @wsparks-vc for coordination.

Credited to wsparks-vc, iskindar.

Questions

Which OpenClaw version fixes this approval binding flaw?

2026.4.2. Versions up to and including 2026.4.1 are affected.

Can an attacker run a command that was never approved?

The advisory describes an approved command running with unapproved environment overrides. It does not describe running a different command.

Does the entry have a CVE?

No CVE id is listed. It is tracked as GHSA-98ch-45wp-ch47.

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