CVE-2026-31995: OpenClaw has Windows Lobster shell fallback command injection in constrained fallback path
On Windows, OpenClaw's Lobster extension retried some failed spawns (ENOENT or EINVAL) with shell: true, so cmd.exe could interpret tool-provided arguments. This allowed command injection in that fallback path. Versions 2026.1.21 through 2026.2.17 are affected. Upgrade the npm package openclaw to 2026.2.19.
Published Mar 3, 2026 · Updated Mar 19, 2026 · Analysis Oct 31, 2026
What an attacker can do
The Lobster extension launches wrapper commands. To keep .cmd and .bat wrappers working on Windows, it retried certain spawn failures with shell: true. In that path the arguments no longer went directly to the program. cmd.exe parsed them, so metacharacters such as & or | could chain extra commands.
The advisory limits the risk. It needs Windows, a fallback-triggering condition (the first spawn failing with ENOENT or EINVAL), and argument control through a local operator-defined workflow. The CVSS 4.0 vector is local with no privileges and low integrity impact, and the maintainers call it medium.
In practice the risk is a workflow whose arguments carry untrusted text, for example model output or file content passed to a Lobster tool. A crafted value could run extra commands as the OpenClaw user on that Windows machine.
Who is affected
npm package openclaw on Windows, versions >= 2026.1.21 and <= 2026.2.17. Only the Lobster extension's spawn fallback is affected. Other platforms did not use this path. Check:
npm ls openclawopenclaw
- Ecosystem
- npm
- Affected
- >= 2026.1.21, <= 2026.2.17
- Fixed in
- 2026.2.19
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.2.19 (fix commit ba7be018da354ea9f803ed356d20464df0437916).
npm install [email protected]The fix removes the Windows shell fallback. It resolves .cmd and .bat shims to a concrete Node entrypoint or executable and runs it with explicit argv and no shell. If it cannot find a safe entrypoint, it now fails with a guided error. After the upgrade, a Lobster workflow that used to work through the fallback may fail until the entrypoint can be resolved.
How to tell if you were hit
On Windows hosts, look for cmd.exe processes spawned by the OpenClaw Node process around Lobster runs, and for unexpected child processes of cmd.exe. Review Lobster workflow definitions for arguments filled from untrusted input. Agent shell commands recorded by Beam can show what ran after a Lobster call.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
On Windows, the Lobster extension previously retried certain spawn failures (ENOENT/EINVAL) with shell: true for wrapper compatibility. In that fallback path, tool-provided arguments could be interpreted by cmd.exe if fallback was triggered.
Affected Packages / Versions
- Package:
openclaw(npm) - Latest published version at triage:
2026.2.17 - Affected range:
>= 2026.1.21 <= 2026.2.17 - Patched version:
2026.2.19(pre-set for next release)
Fix
The Windows shell fallback was removed. Wrapper compatibility is preserved by resolving .cmd/.bat shims to a concrete Node entrypoint (or executable) and executing with explicit argv (no shell). If a safe entrypoint cannot be resolved, execution now fails closed with a guided error.
Fix Commit(s)
ba7be018da354ea9f803ed356d20464df0437916
Severity Context
This issue requires Windows plus fallback-triggering conditions, and argument control through a local operator-defined workflow.
OpenClaw thanks @tdjackey for reporting.
Credited to tdjackey.
Questions
- Does CVE-2026-31995 affect Linux or macOS?
The advisory describes the shell fallback as Windows-only and lists Windows as a requirement.
- Which versions are affected?
2026.1.21 through 2026.2.17. The fixed release is 2026.2.19.
- Does the fix change behavior?
Yes. Shell execution is removed. If a safe entrypoint cannot be resolved, the extension fails closed with an error instead of falling back to cmd.exe.
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 entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
