AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-28391: OpenClaw's Windows cmd.exe parsing may bypass exec allowlist/approval gating

highCVSS 4.0 7.4 · 3.1 9.8GHSA-qj77-c3c8-9c3q

OpenClaw 2026.2.1 and earlier on Windows nodes can run commands that the exec allowlist or approval gate never approved. The allowlist check did not model cmd.exe parsing, so a crafted command string can chain extra operations. Only installs that turned on exec allowlist or approval gating are affected. Upgrade openclaw to 2026.2.2.

Published Feb 17, 2026 · Updated Mar 10, 2026 · Analysis Nov 24, 2026

What an attacker can do

On Windows nodes, OpenClaw ran exec requests as cmd.exe with the flags /d /s /c followed by the raw command string, through src/infra/node-shell.ts. When allowlist or approval gating was on, the check looked at the command as if a POSIX-style parser would read it. cmd.exe reads it differently. The ampersand chains a second command, and percent or exclamation sign pairs expand variables. A string that looks like an approved command can therefore run extra operations after it (CWE-78).

The gate exists to limit what an AI agent can run on a node. The flaw lets a command beyond the approved set pass through. An attacker who can steer the agent, for example through prompt injection in content the agent reads, or who can submit exec requests, can reach arbitrary commands with the node's rights.

The advisory says default installs are not affected. The risk falls on teams that enabled allowlist or approval gating on Windows nodes and rely on it as a security control. The two scores differ (9.8 under CVSS 3.1, 7.4 under 4.0), so read them as high but dependent on how the node is exposed.

Who is affected

Affected: the npm package openclaw, versions before 2026.2.2 (2026.2.1 and earlier). Version 2026.2.2 is patched. Only Windows nodes that opted into exec allowlist or approval gating are exposed. Default installs are not.

Check your version on each Windows node:

npm ls -g openclaw
openclaw --version

Then check whether your exec policy uses an allowlist or approvals.

openclaw

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

How to fix it

Upgrade openclaw to 2026.2.2 or later:

npm install -g openclaw@latest

The fix, commit a7f4a53, passes the platform into allowlist analysis and rejects Windows shell metacharacters. It also treats a cmd.exe invocation as not allowlist-safe, and runs the parsed argv directly instead of using cmd.exe in allowlist mode when it can. The advisory names no other workaround, so do not assume that switching gating off is safe.

How to tell if you were hit

Review exec logs on Windows nodes for approved commands whose raw string contains an ampersand, percent pairs or exclamation pairs, and for child processes started by cmd.exe that are not on your allowlist. Compare process creation events with the approvals recorded in OpenClaw.

If you run Beam beside your agents, its record of agent shell commands can show what was actually run, not just what was approved.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

On Windows nodes, exec requests were executed via cmd.exe /d /s /c <rawCommand>. In allowlist/approval-gated mode, the allowlist analysis did not model Windows cmd.exe parsing and metacharacter behavior. A crafted command string could cause cmd.exe to interpret additional operations (for example command chaining via &, or expansion via %...% / !...!) beyond what was allowlisted/approved.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Affected: <= 2026.2.1
  • Patched: >= 2026.2.2
  • Latest (npm) as of 2026-02-14: 2026.2.13

Details

  • Default installs: Not affected unless you opt into exec allowlist/approval gating on Windows nodes.
  • Windows execution uses cmd.exe via src/infra/node-shell.ts.
  • The fix hardens Windows allowlist enforcement by:
  • Passing the platform into allowlist analysis and rejecting Windows shell metacharacters.
  • Treating cmd.exe invocation as not allowlist-safe on Windows.
  • Avoiding cmd.exe entirely in allowlist mode by executing the parsed argv directly when possible.

Fix Commit(s)

  • a7f4a53ce80c98ba1452eb90802d447fca9bf3d6

Thanks @simecek for reporting.

Credited to simecek, stanislavfortaisle.

Questions

Are default OpenClaw installs affected by CVE-2026-28391?

No. The advisory says default installs are not affected unless you opted into exec allowlist or approval gating on Windows nodes.

Which OpenClaw version fixes CVE-2026-28391?

2026.2.2. Versions up to and including 2026.2.1 are affected. The fix is commit a7f4a53.

Does this affect macOS or Linux nodes?

The advisory describes only the Windows path, where exec runs through cmd.exe. It does not report the flaw on other platforms.

Is CVE-2026-28391 exploited in the wild?

The sources do not say so. The entry has no CISA catalog data, and the EPSS score is about 0.5 percent.

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