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

CVE-2026-31999: CpenClaw's ACPX Windows wrapper shell fallback allowed cwd injection in specific paths

criticalCVSS 4.0 9.3GHSA-6f6j-wx9w-ff4j

On Windows, OpenClaw's ACPX path could fall back to shell execution when resolving `.cmd` and `.bat` wrappers. In that fallback, the working directory (`cwd`) could change what ran. Only versions from 2026.2.26 up to, but not including, 2026.3.1 are affected. Upgrade the `openclaw` npm package to 2026.3.1.

Published Mar 2, 2026 · Updated Mar 20, 2026 · Analysis Oct 31, 2026

What an attacker can do

ACPX launches tools through wrapper scripts on Windows. For .cmd and .bat entrypoints, the resolver could drop back to running them through the shell. The shell on Windows looks in the current directory, so a cwd an attacker controls can influence which file executes. The advisory describes the result as command execution integrity loss, and it is classed as OS command injection (CWE-78).

The advisory is brief on preconditions. It says this applies in affected Windows ACPX configurations and where cwd can influence wrapper resolution. In practice that means a workspace or project directory with a planted wrapper file that an agent run uses as its working directory, such as a cloned repository. The commands run with the privileges of the OpenClaw process.

The CVSS 4.0 score in the GitHub advisory is 9.3, with a network vector. VulnCheck lists the same flaw as medium, 5.8, with a local vector. Treat the higher rating as the planning number until the sources agree. The advisory does not say the flaw is exploited in the wild.

Who is affected

Affected: the openclaw npm package from 2026.2.26 up to but not including 2026.3.1, running ACPX on Windows. Other operating systems and versions before 2026.2.26 are outside the stated range.

Check the version in PowerShell or a terminal:

npm ls openclaw

For a global install, use npm ls -g openclaw.

openclaw

Ecosystem
npm
Affected
>= 2026.2.26, < 2026.3.1
Fixed in
2026.3.1
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.3.1:

npm install [email protected]

The fix changes wrapper resolution. It now prefers explicit PATH and PATHEXT entrypoint resolution, and runs Node or EXE targets unwrapped. For wrapper cases it cannot resolve, strict fail-closed handling is on by default instead of using the shell. The advisory lists no workaround. Until you upgrade, avoid pointing Windows ACPX runs at directories you do not control.

How to tell if you were hit

On Windows hosts running ACPX, look for .cmd or .bat files in agent working directories and project folders that you did not create, and for cmd.exe child processes of the OpenClaw process started from those directories. Process-creation logs (Sysmon event 1 or Windows event 4688 with command-line auditing) will show the executed path and parent. After upgrading, an unresolvable wrapper fails closed with an error instead of running.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

On Windows ACPX paths, wrapper resolution for .cmd/.bat could fall back to shell execution in ways that allowed cwd influence to alter execution behavior.

Impact

In affected Windows ACPX configurations, this could enable command execution integrity loss through cwd-influenced wrapper resolution.

Fix

Wrapper resolution now prefers explicit PATH/PATHEXT entrypoint resolution and unwrapped Node/EXE execution, with strict fail-closed handling enabled by default for unresolvable wrapper cases.

Affected and Patched Versions

  • Affected: >= 2026.2.26, < 2026.3.1
  • Patched: 2026.3.1

Credited to tdjackey.

Questions

Does CVE-2026-31999 affect Linux or macOS?

The advisory describes Windows ACPX wrapper resolution for .cmd and .bat files only. It gives no impact for other systems.

Why do the sources disagree on severity?

The GitHub advisory scores it 9.3 (critical, network vector). VulnCheck lists 5.8 (medium, local vector). The description does not settle which attack path applies, so patch on the higher rating.

Which version fixes it?

2026.3.1. The affected range is 2026.2.26 up to but not including 2026.3.1.

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