Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-31997

CVE-2026-31997: Openclaw Openclaw RCE Vulnerability

CVE-2026-31997 is a remote code execution flaw in Openclaw Openclaw that enables post-approval executable rebind attacks. This article covers the technical details, affected versions, impact, and mitigation strategies.

Published: March 20, 2026

CVE-2026-31997 Overview

OpenClaw versions prior to 2026.3.1 contain a Time-of-Check Time-of-Use (TOCTOU) vulnerability in the system.run approval mechanism. The application fails to pin executable identity for non-path-like argv[0] tokens during system.run approvals, enabling post-approval executable rebind attacks. This weakness allows attackers to modify PATH resolution after approval to execute a different binary than what the operator originally approved, potentially enabling arbitrary command execution on the affected system.

Critical Impact

Attackers can exploit the race condition between approval and execution to substitute approved executables with malicious binaries, bypassing security controls and enabling arbitrary command execution.

Affected Products

  • OpenClaw versions prior to 2026.3.1
  • OpenClaw for Node.js (all affected versions)
  • Systems using OpenClaw system.run approval workflows

Discovery Timeline

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

Technical Details for CVE-2026-31997

Vulnerability Analysis

This vulnerability stems from a classic Time-of-Check Time-of-Use (TOCTOU) race condition (CWE-367) in OpenClaw's system.run approval process. When an operator approves a command execution request, OpenClaw verifies the executable at approval time but fails to maintain a binding between the approved identity and the actual executable that runs. For non-path-like argv[0] tokens (commands specified without an absolute path), the application relies on PATH environment variable resolution at execution time rather than locking the executable at approval time.

This design flaw creates a window of opportunity between when an operator approves a command and when that command actually executes. During this window, an attacker with local access can manipulate the PATH environment variable or place a malicious binary in a directory that takes precedence in PATH resolution. When the approved command finally executes, it resolves to the attacker's malicious binary instead of the legitimate executable that was implicitly approved.

Root Cause

The root cause lies in OpenClaw's failure to implement proper executable identity pinning during the approval workflow. When system.run receives approval for a command like python script.py, it stores only the command string rather than resolving and recording the full path to the executable (e.g., /usr/bin/python). This leaves the actual executable resolution to occur at execution time, creating the exploitable TOCTOU window.

Attack Vector

The attack requires local access to the system and leverages the following sequence:

  1. A legitimate user requests approval to run a command using a non-path-like token (e.g., git, python, node)
  2. An operator reviews and approves the request, trusting the named executable
  3. Before execution occurs, the attacker modifies the PATH environment variable or places a malicious binary in a higher-priority PATH directory
  4. When OpenClaw executes the approved command, PATH resolution now points to the attacker's malicious binary
  5. The malicious binary executes with whatever privileges the system.run process holds

The vulnerability requires user interaction (operator approval) and local access, which limits the attack surface but still presents a significant risk in multi-user environments or systems with shared access.

Detection Methods for CVE-2026-31997

Indicators of Compromise

  • Unexpected changes to PATH environment variable in processes running OpenClaw
  • New or modified executables appearing in PATH directories shortly before approved command execution
  • Discrepancies between approved command names and actual executed binary paths in audit logs
  • Unusual process spawning patterns from OpenClaw system.run processes

Detection Strategies

  • Monitor for PATH environment variable modifications in OpenClaw process contexts
  • Implement file integrity monitoring on directories in the system PATH
  • Audit system.run approval logs and correlate with actual execution paths
  • Deploy behavioral analysis to detect approved commands executing from unexpected locations

Monitoring Recommendations

  • Enable verbose logging for OpenClaw system.run operations to capture both approval and execution details
  • Configure alerts for any executable resolution that differs from typical patterns
  • Monitor process creation events from OpenClaw processes using endpoint detection tools
  • Review OpenClaw audit logs regularly for signs of exploitation attempts

How to Mitigate CVE-2026-31997

Immediate Actions Required

  • Upgrade OpenClaw to version 2026.3.1 or later immediately
  • Audit recent system.run approvals and executions for any discrepancies
  • Restrict local access to systems running vulnerable OpenClaw versions
  • Implement additional access controls around PATH-modifiable directories

Patch Information

OpenClaw has released version 2026.3.1 which addresses this vulnerability by implementing proper executable identity pinning at approval time. The fix ensures that when a non-path-like command is approved, OpenClaw resolves and records the full executable path immediately, preventing post-approval rebind attacks.

For detailed patch information and upgrade instructions, refer to the GitHub Security Advisory. Additional technical details are available in the VulnCheck Advisory.

Workarounds

  • Use absolute paths for all system.run approvals (e.g., /usr/bin/python instead of python)
  • Implement strict PATH controls preventing modification in OpenClaw execution contexts
  • Restrict write access to all directories in the system PATH
  • Deploy additional monitoring to detect PATH manipulation attempts before patching is possible
bash
# Configuration example: Restrict PATH to trusted directories only
export PATH="/usr/local/bin:/usr/bin:/bin"
chmod 755 /usr/local/bin /usr/bin /bin
# Ensure only root can write to PATH directories

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 Score4.4

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:A/VC:N/VI:H/VA:H/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
  • ConfidentialityHigh
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-367
  • Technical References
  • VulnCheck Advisory
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-35641: Openclaw RCE Vulnerability

  • CVE-2026-35650: Openclaw RCE Vulnerability

  • CVE-2026-35643: Openclaw Openclaw RCE Vulnerability

  • CVE-2026-32917: Openclaw Remote Command Injection Flaw
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