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
    • 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-42435

CVE-2026-42435: OpenClaw RCE Vulnerability Explained

CVE-2026-42435 is a remote code execution flaw in OpenClaw that enables attackers to inject environment variables and bypass security controls. This article covers technical details, affected versions, impact, and mitigation.

Published: May 7, 2026

CVE-2026-42435 Overview

CVE-2026-42435 is a shell-wrapper detection bypass affecting OpenClaw versions from 2026.2.22 before 2026.4.12. The vulnerability allows attackers to inject environment variable assignments at the argv level, bypassing the exec preflight handling that filters dangerous variables. Successful exploitation lets attackers manipulate high-risk shell variables such as SHELLOPTS and PS4, altering execution semantics and undermining downstream security controls. The flaw is classified under [CWE-184: Incomplete List of Disallowed Inputs].

Critical Impact

Attackers with low privileges and network access can inject environment variables that modify shell execution behavior, leading to integrity, confidentiality, and availability impact across affected OpenClaw deployments.

Affected Products

  • OpenClaw 2026.2.22 through versions before 2026.4.12
  • Components handling env-style argv parsing in dispatch-wrapper-resolution.ts
  • Host environment security layer in host-env-security.ts

Discovery Timeline

  • 2026-05-05 - CVE-2026-42435 published to NVD
  • 2026-05-05 - Last updated in NVD database

Technical Details for CVE-2026-42435

Vulnerability Analysis

OpenClaw includes a preflight mechanism that inspects argument vectors passed to shell wrappers such as env, blocking dangerous environment keys before execution. The shell-wrapper detection logic in unwrapEnvInvocation does not fully recognize all forms of env-style invocations and treats only specific separator tokens and flag patterns as continuation signals. Attackers can craft an argv sequence that contains KEY=VALUE assignments which the detector fails to classify as environment overrides. As a result, the assignments propagate to the spawned process while bypassing the dangerous-key filter.

Once bypassed, attackers can set variables like SHELLOPTS, which controls Bash startup behavior, and PS4, which Bash expands when tracing is enabled. Manipulation of PS4 is a known technique for command execution under set -x, and SHELLOPTS can enable tracing or restricted modes that change downstream command semantics.

Root Cause

The root cause is an incomplete denylist within the shell-wrapper recognizer. The previous parser used a narrow set of separators and flag matchers, which allowed argv tokens shaped as environment assignments to slip past detection. Because the detector returned null, the host-env hardening that normally blocks dangerous keys was never applied to those assignments.

Attack Vector

Exploitation requires the ability to influence the argv passed to an OpenClaw dispatch wrapper. An attacker with low privileges can supply crafted argv tokens that include SHELLOPTS=xtrace or PS4=$(payload) at positions the parser does not classify as assignments. The injected variables persist into the executed shell context, enabling subversion of execution semantics and security controls.

typescript
// Source: https://github.com/openclaw/openclaw/commit/8f8492d172f4c5b4fd7dd9a47855ed620c8770ab
// Patched parser in src/infra/dispatch-wrapper-resolution.ts
export function unwrapEnvInvocation(argv: string[]): string[] | null {
  const parsed = parseEnvInvocationPrelude(argv);
  return parsed ? argv.slice(parsed.commandIndex) : null;
}

type ParsedEnvInvocationPrelude = {
  assignmentKeys: string[];
  commandIndex: number;
};

function parseEnvInvocationPrelude(argv: string[]): ParsedEnvInvocationPrelude | null {
  let idx = 1;
  let expectsOptionValue = false;
  const assignmentKeys: string[] = [];
  while (idx < argv.length) {
    const token = argv[idx]?.trim() ?? "";
    // ... structured parsing replaces narrow separator/flag heuristics
  }
}

The patch replaces the narrow separator and flag heuristics with a structured prelude parser that records assignment keys and identifies the actual command boundary. See the GitHub Security Advisory GHSA-j6c7-3h5x-99g9 for additional context.

Detection Methods for CVE-2026-42435

Indicators of Compromise

  • Process executions where argv to env or related wrappers contain SHELLOPTS=, PS4=, BASH_ENV=, or ENV= assignments.
  • Child shells launched by OpenClaw with tracing enabled or with non-standard PS4 values containing command substitution syntax such as $(...) or backticks.
  • Unexpected execution of OpenClaw dispatch wrappers running versions between 2026.2.22 and 2026.4.12.

Detection Strategies

  • Inventory OpenClaw deployments and flag any instance not at version 2026.4.12 or later.
  • Hunt process telemetry for argv strings matching dangerous environment key patterns delivered alongside env-style binaries.
  • Correlate OpenClaw process launches with subsequent shell child processes that show evidence of xtrace behavior or anomalous command substitution.

Monitoring Recommendations

  • Enable command-line and environment variable capture in endpoint telemetry to retain full argv for shell wrappers.
  • Alert on any OpenClaw-spawned process whose environment includes keys present in the host dangerous-env list, including SHELLOPTS, PS4, BASH_ENV, LD_PRELOAD, and LD_LIBRARY_PATH.
  • Track OpenClaw version strings in software inventory feeds to detect regressions or unmanaged installations.

How to Mitigate CVE-2026-42435

Immediate Actions Required

  • Upgrade OpenClaw to version 2026.4.12 or later, which contains the patched parseEnvInvocationPrelude logic.
  • Audit existing automation and CI/CD pipelines that invoke OpenClaw wrappers for argv constructed from untrusted input.
  • Restrict who can submit argv to OpenClaw dispatch wrappers through standard authorization controls.

Patch Information

The fix is delivered in commit 8f8492d, which broadens shell-wrapper detection and blocks env-argv assignment injection. The patch introduces HOST_SHELL_WRAPPER_ALLOWED_OVERRIDE_ENV_PREFIX_VALUES to permit only safe prefixes such as LC_ while keeping the dangerous-env denylist authoritative. Additional details are available in the VulnCheck advisory.

Workarounds

  • Sanitize argv passed to OpenClaw wrappers to strip tokens matching ^[A-Za-z_][A-Za-z0-9_]*= before invocation.
  • Run OpenClaw under a constrained shell environment that resets SHELLOPTS, PS4, BASH_ENV, and ENV prior to execution.
  • Disable or gate OpenClaw functionality exposed to low-privilege or network-reachable callers until patching is complete.
bash
# Configuration example: reset high-risk shell variables before invoking OpenClaw
unset SHELLOPTS PS4 BASH_ENV ENV
export PS4='+ '
exec /usr/local/bin/openclaw "$@"

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechOpenclaw

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.10%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/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
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-184
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory

  • VulnCheck Advisory
  • Related CVEs
  • CVE-2026-43584: OpenClaw RCE Vulnerability

  • CVE-2026-44115: OpenClaw RCE Vulnerability Explained

  • CVE-2026-44114: OpenClaw RCE Vulnerability

  • CVE-2026-42434: OpenClaw Sandbox Escape 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