OpenClaw's Windows cmd.exe parsing may bypass exec allowlist/approval gating

Description

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.

Basic information

Type
reviewed
Severity
high
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-02-17 16:44:11 UTC
Updated
2026-03-10 18:41:44 UTC
GitHub reviewed
2026-02-17 16:44:11 UTC
NVD published
2026-03-05

EPSS Score

Score Percentile
0.08% 23.16%

CVSS Scores

Base score Version Severity Vector
9.8 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
7.4 4.0
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N Click to expand
Attack vector (AV:L)
Attacker needs local access on the target system.
Attack complexity (AC:L)
Exploitation conditions are straightforward and stable.
Attack requirements (AT:P)
Additional preconditions must be present for exploitation.
Privileges required (PR:N)
No privileges are required.
User interaction (UI:N)
No user interaction is required.
Vulnerable system confidentiality impact (VC:H)
High confidentiality impact on the vulnerable system.
Vulnerable system integrity impact (VI:H)
High integrity impact on the vulnerable system.
Vulnerable system availability impact (VA:N)
No availability impact on the vulnerable system.
Subsequent system confidentiality impact (SC:N)
No confidentiality impact on subsequent systems.
Subsequent system integrity impact (SI:N)
No integrity impact on subsequent systems.
Subsequent system availability impact (SA:N)
No availability impact on subsequent systems.

Identifiers

CWEs

CWE id Name
CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Credits

  • simecek (reporter)
  • stanislavfortaisle (analyst)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm openclaw < 2026.2.2 2026.2.2

References

cvelogic Threat Intelligence