The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-22176

CVE-2026-22176: Openclaw Command Injection Vulnerability

CVE-2026-22176 is a command injection vulnerability in Openclaw that allows attackers to execute arbitrary commands through malicious environment variables. This article covers technical details, affected versions, and mitigation.

Published: March 20, 2026

CVE-2026-22176 Overview

CVE-2026-22176 is a command injection vulnerability affecting OpenClaw versions prior to 2026.2.19. The vulnerability exists in the Windows Scheduled Task script generation functionality where environment variables are written to gateway.cmd using unquoted set KEY=VALUE assignments. This implementation flaw allows shell metacharacters to break out of the assignment context, enabling attackers to inject and execute arbitrary commands.

Attackers can exploit this vulnerability by crafting environment variable values containing Windows shell metacharacters such as &, |, ^, %, or !. When the scheduled task script is generated and subsequently executed, these metacharacters are interpreted by the Windows command processor, resulting in command execution beyond the intended scope of the environment variable assignment.

Critical Impact

Local attackers with low privileges can achieve arbitrary command execution through maliciously crafted environment variable values, potentially leading to system compromise, data manipulation, or further lateral movement within the affected environment.

Affected Products

  • OpenClaw versions prior to 2026.2.19
  • OpenClaw for Node.js (all platforms with Windows Scheduled Task functionality)

Discovery Timeline

  • 2026-03-19 - CVE-2026-22176 published to NVD
  • 2026-03-19 - Last updated in NVD database

Technical Details for CVE-2026-22176

Vulnerability Analysis

This command injection vulnerability (CWE-78) stems from improper handling of environment variable values during Windows Scheduled Task script generation. The OpenClaw daemon creates .cmd batch files for scheduled task execution, writing environment variables using simple set KEY=VALUE syntax without proper escaping or quoting of the values.

In Windows batch scripting, certain metacharacters have special meaning and can alter command flow. When user-controlled data containing these characters is written directly into a .cmd file without sanitization, the command processor interprets them during execution. For example, an ampersand (&) allows command chaining, a pipe (|) enables command piping, and the caret (^) serves as an escape character that can be weaponized for injection.

The attack requires local access with low privileges, as the attacker must be able to influence the environment variable values that OpenClaw uses during script generation. However, no user interaction is required once the malicious values are in place—the scheduled task will execute the injected commands automatically when triggered.

Root Cause

The root cause is the use of unquoted set KEY=VALUE assignments when writing environment variables to the gateway.cmd scheduled task script. The vulnerable code path in src/daemon/schtasks.ts failed to escape or properly quote environment variable values before writing them to the batch file, allowing metacharacters to break out of the assignment context and execute arbitrary commands.

Attack Vector

The attack vector is local, requiring an attacker with low-level privileges to set or influence environment variable values that will be processed by OpenClaw's scheduled task generation functionality. The attacker crafts environment variable values containing shell metacharacters that, when written to the .cmd file and executed, perform unintended actions.

For example, an environment variable value like normalvalue & whoami > C:\temp\output.txt would cause the whoami command to execute and write its output to a file when the scheduled task runs.

typescript
 import fs from "node:fs/promises";
 import path from "node:path";
-import { splitArgsPreservingQuotes } from "./arg-split.js";
-import { resolveGatewayServiceDescription, resolveGatewayWindowsTaskName } from "./constants.js";
-import { formatLine, writeFormattedLines } from "./output.js";
-import { resolveGatewayStateDir } from "./paths.js";
-import { parseKeyValueOutput } from "./runtime-parse.js";
-import { execSchtasks } from "./schtasks-exec.js";
 import type { GatewayServiceRuntime } from "./service-runtime.js";
 import type {
   GatewayServiceCommandConfig,

Source: GitHub Commit Update

Detection Methods for CVE-2026-22176

Indicators of Compromise

  • Unexpected content in gateway.cmd files containing shell metacharacters (&, |, ^, %, !) in environment variable assignments
  • Scheduled task execution logs showing commands beyond expected OpenClaw operations
  • Suspicious process creation events originating from OpenClaw scheduled task scripts
  • Modified or newly created files in unexpected locations following scheduled task execution

Detection Strategies

  • Monitor Windows Scheduled Task creation and modification events for tasks associated with OpenClaw
  • Implement file integrity monitoring on .cmd files generated by OpenClaw in the gateway state directory
  • Analyze Windows Event Logs for process creation events (Event ID 4688) where the parent process is a scheduled task and the command line contains unexpected metacharacters
  • Deploy endpoint detection rules to identify batch file execution with command chaining or piping patterns

Monitoring Recommendations

  • Enable and collect Windows Security Event logs with command-line process creation auditing
  • Configure SentinelOne behavioral AI to detect anomalous command execution patterns from scheduled tasks
  • Establish baseline of normal OpenClaw scheduled task behavior and alert on deviations
  • Monitor environment variable modifications on systems running OpenClaw

How to Mitigate CVE-2026-22176

Immediate Actions Required

  • Upgrade OpenClaw to version 2026.2.19 or later, which includes the security fix for proper environment variable escaping
  • Review existing OpenClaw installations for any .cmd files containing suspicious content
  • Audit environment variables on systems running OpenClaw for unexpected metacharacters
  • Temporarily disable OpenClaw scheduled tasks until patching is complete if exploitation is suspected

Patch Information

The vulnerability has been addressed in OpenClaw version 2026.2.19. The fix modifies the src/daemon/schtasks.ts file to properly escape environment variable values before writing them to the scheduled task batch files. The security patch is available via the GitHub Commit Update. Additional details are available in the GitHub Security Advisory.

Workarounds

  • If immediate patching is not possible, restrict access to OpenClaw configuration and environment variable settings to trusted administrators only
  • Implement strict input validation at the application layer for any values that could become environment variables
  • Use Windows Group Policy to restrict scheduled task creation and modification permissions
  • Monitor and audit all scheduled task scripts before execution using file integrity monitoring solutions
bash
# Verify OpenClaw version and check for vulnerable installations
npm list openclaw

# Update OpenClaw to the patched version
npm update openclaw@2026.2.19

# Review generated scheduled task scripts for suspicious content
findstr /R /C:"[&|^%!]" C:\path\to\openclaw\gateway.cmd

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechOpenclaw

  • SeverityMEDIUM

  • CVSS Score6.9

  • EPSS Probability0.15%

  • Known ExploitedNo
  • CVSS 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-78
  • Technical References
  • VulnCheck Command Injection Advisory
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-32917: Openclaw Remote Command Injection Flaw

  • CVE-2026-32920: Openclaw RCE Vulnerability

  • CVE-2026-32971: Openclaw RCE Vulnerability

  • CVE-2026-32978: Openclaw RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English