CVE-2026-31994: Openclaw OpenClaw Windows Scheduled Task Script Vulnerability

HIGH
Advisory Identifier: GHSA-mqr9-vqhq-3jxw
CWE-116
Published
Advisory Summary

CVE-2026-31994 is a HIGH openclaw windows scheduled task script vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Openclaw libraries in the npm ecosystem. The issue involves openclaw windows scheduled task script generation allowed local command injection via unsafe cmd argument handling. Remediation is available by upgrading affected packages to version 2026.2.19.

CVE-2026-31994 at a Glance

CVE Identifier CVE-2026-31994
GHSA Identifier GHSA-mqr9-vqhq-3jxw
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Openclaw
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-31994

To remediate this vulnerability, upgrade all affected Openclaw dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

openclaw fixed: 2026.2.19
npm install openclaw@2026.2.19
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls openclaw

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-31994, inspect your project dependencies using npm:

npm ls openclaw

Analyze the terminal output to locate any version of Openclaw in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2026.2.19), your application is affected.

Note: The npm ls openclaw command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Openclaw, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary OpenClaw Windows Scheduled Task script generation allowed unsafe argument handling in generated `gateway.cmd` files. In vulnerable versions, cmd metacharacter-only values could be emitted without safe quoting/escaping, which could lead to unintended command execution when the scheduled task runs. ### Details The issue affected Windows daemon startup script generation in `src/daemon/schtasks.ts`. Vulnerable behavior included: - Incomplete cmd argument quoting for metacharacter-only values. - Incomplete handling of cmd expansion-sensitive characters in script arguments. - Missing CR/LF guards for script-rendered fields. The fix hardens Windows script generation by: - Separating schtasks argument quoting from batch script argument quoting. - Quoting cmd metacharacter arguments and escaping `%` / `!` expansion cases. - Rejecting CR/LF in command arguments, task descriptions, and rendered environment assignments. - Adding regression tests for metacharacter and line-break injection paths. ### Impact This issue is local to Windows deployments and requires control over values that feed service script generation (for example install-time/runtime arguments or environment-derived values). It can result in unintended command execution in the scheduled task context. ### Affected Packages / Versions - Package: `openclaw` (npm) - Vulnerable versions: `<= 2026.2.17` - Patched version: `>= 2026.2.19` (planned next npm release) - Latest published npm version at update time (2026-02-19): `2026.2.17` ### Fix Commit(s) - `280c6b117b2f0e24f398e5219048cd4cc3b82396` OpenClaw thanks @tdjackey for reporting.

CVE-2026-31994 Affected Openclaw Versions

1 component(s)
Fixed Versions:
2026.2.19
Product / Package Ecosystem Affected Versions Fixed Version
openclaw
npm
< 2026.2.19
2026.2.19

References

Frequently Asked Questions

What is CVE-2026-31994?
CVE-2026-31994 is a security vulnerability in Openclaw involving OpenClaw Windows Scheduled Task script generation allowed local command injection via unsafe cmd argument handling under CWE-116: Improper Encoding or Escaping of Output.
Which Openclaw versions are affected?
Affected versions include releases prior to 2026.2.19 across affected packages: openclaw.
What version fixes CVE-2026-31994?
Upgrading to 2026.2.19 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openclaw affected?
Yes, openclaw is affected in releases prior to 2026.2.19. Upgrade your dependency to 2026.2.19 or later.
What CWE is associated with CVE-2026-31994?
CVE-2026-31994 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check npm dependencies for CVE-2026-31994?
Run the dependency tree command: 'npm ls openclaw'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mqr9-vqhq-3jxw",
  "modified" : "2026-03-19T21:24:33Z",
  "published" : "2026-03-03T21:37:29Z",
  "aliases" : [ "CVE-2026-31994" ],
  "summary" : "OpenClaw Windows Scheduled Task script generation allowed local command injection via unsafe cmd argument handling",
  "details" : "### Summary\nOpenClaw Windows Scheduled Task script generation allowed unsafe argument handling in generated `gateway.cmd` files. In vulnerable versions, cmd metacharacter-only values could be emitted without safe quoting/escaping, which could lead to unintended command execution when the scheduled task runs.\n\n### Details\nThe issue affected Windows daemon startup script generation in `src/daemon/schtasks.ts`.\n\nVulnerable behavior included:\n- Incomplete cmd argument quoting for metacharacter-only values.\n- Incomplete handling of cmd expansion-sensitive characters in script arguments.\n- Missing CR/LF guards for script-rendered fields.\n\nThe fix hardens Windows script generation by:\n- Separating schtasks argument quoting from batch script argument quoting.\n- Quoting cmd metacharacter arguments and escaping `%` / `!` expansion cases.\n- Rejecting CR/LF in command arguments, task descriptions, and rendered environment assignments.\n- Adding regression tests for metacharacter and line-break injection paths.\n\n### Impact\nThis issue is local to Windows deployments and requires control over values that feed service script generation (for example install-time/runtime arguments or environment-derived values). It can result in unintended command execution in the scheduled task context.\n\n### Affected Packages / Versions\n- Package: `openclaw` (npm)\n- Vulnerable versions: `<= 2026.2.17`\n- Patched version: `>= 2026.2.19` (planned next npm release)\n- Latest published npm version at update time (2026-02-19): `2026.2.17`\n\n### Fix Commit(s)\n- `280c6b117b2f0e24f398e5219048cd4cc3b82396`\n\nOpenClaw thanks @tdjackey for reporting.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "openclaw"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2026.2.19"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/security/advisories/GHSA-mqr9-vqhq-3jxw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-31994"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/commit/280c6b117b2f0e24f398e5219048cd4cc3b82396"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openclaw/openclaw"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/openclaw-local-command-injection-via-unsafe-cmd-argument-handling-in-windows-scheduled-task"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-03T21:37:29Z",
    "nvd_published_at" : null
  }
}