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-31975

CVE-2026-31975: Cloud CLI OS Command Injection Vulnerability

CVE-2026-31975 is an OS command injection flaw in Cloud CLI that allows attackers to execute arbitrary OS commands via unsanitized WebSocket messages. This article covers the technical details, affected versions, and mitigation steps.

Published: March 13, 2026

CVE-2026-31975 Overview

CVE-2026-31975 is a high-severity OS Command Injection vulnerability discovered in Cloud CLI (also known as Claude Code UI), a desktop and mobile user interface for Claude Code, Cursor CLI, Codex, and Gemini-CLI. Prior to version 1.25.0, the application fails to sanitize user-supplied input from WebSocket message payloads before interpolating them into bash command strings, enabling arbitrary OS command execution.

The vulnerability exists in server/index.js where the projectPath and initialCommand parameters are taken directly from WebSocket messages and incorporated into shell commands without proper validation or escaping. A secondary injection vector was also identified via the unsanitized sessionId parameter, providing multiple attack surfaces for exploitation.

Critical Impact

Attackers with network access and low privileges can execute arbitrary operating system commands on vulnerable systems, potentially leading to complete system compromise, data exfiltration, or lateral movement within the network.

Affected Products

  • Cloud CLI (Claude Code UI) versions prior to 1.25.0
  • Desktop and mobile deployments using vulnerable WebSocket shell functionality
  • Environments exposing the WebSocket interface to untrusted networks

Discovery Timeline

  • 2026-03-11 - CVE CVE-2026-31975 published to NVD
  • 2026-03-12 - Last updated in NVD database

Technical Details for CVE-2026-31975

Vulnerability Analysis

This vulnerability is classified as CWE-78 (Improper Neutralization of Special Elements used in an OS Command), commonly known as OS Command Injection. The flaw allows authenticated users with network access to inject arbitrary shell commands through the WebSocket interface.

The attack can be executed over the network with low complexity and requires only low-level privileges. No user interaction is needed for exploitation, and successful attacks can result in high impact to confidentiality, integrity, and availability of the affected system.

The vulnerability represents a classic case of insufficient input validation where user-controlled data flows directly into a security-sensitive operation (command execution) without proper sanitization boundaries.

Root Cause

The root cause stems from insecure coding practices in server/index.js where WebSocket message parameters are directly concatenated into bash command strings. The developers failed to implement proper input sanitization, output encoding, or parameterized command execution when handling the following fields:

  • projectPath - The project directory path parameter
  • initialCommand - The initial shell command to execute
  • sessionId - The session identifier

These values are interpolated directly into shell commands using string concatenation or template literals, allowing an attacker to inject shell metacharacters and escape the intended command context.

Attack Vector

The vulnerability is exploitable via network-accessible WebSocket connections. An attacker can craft malicious WebSocket messages containing shell metacharacters (such as ;, |, &&, $(), or backticks) within the projectPath, initialCommand, or sessionId parameters.

When the server processes these messages, the injected commands are executed with the privileges of the application process. For example, an attacker could inject commands to:

  • Read sensitive configuration files and credentials
  • Establish reverse shells for persistent access
  • Download and execute additional malware
  • Modify or delete critical application data
  • Pivot to other systems on the internal network

The secondary injection vector via sessionId provides an alternative attack path if the primary parameters are later hardened without addressing all input sources.

Detection Methods for CVE-2026-31975

Indicators of Compromise

  • Unexpected child processes spawned by the Cloud CLI server process
  • WebSocket messages containing shell metacharacters like ;, |, &&, $(), or backticks in projectPath, initialCommand, or sessionId fields
  • Unusual outbound network connections from the server to external IP addresses
  • Modifications to system files or creation of unexpected files by the application user account

Detection Strategies

  • Monitor WebSocket traffic for suspicious patterns including shell metacharacters in message payloads
  • Implement application-level logging to capture all WebSocket message parameters before processing
  • Deploy endpoint detection and response (EDR) solutions to identify anomalous process execution chains
  • Use web application firewalls (WAF) configured to detect command injection patterns in WebSocket traffic

Monitoring Recommendations

  • Enable verbose logging for the Cloud CLI server to capture incoming WebSocket messages
  • Configure alerting for any shell commands executed by the server process outside expected patterns
  • Monitor system call activity using auditd or similar tools to detect command execution anomalies
  • Review server logs regularly for attempted exploitation attempts

How to Mitigate CVE-2026-31975

Immediate Actions Required

  • Upgrade Cloud CLI (Claude Code UI) to version 1.25.0 or later immediately
  • If immediate patching is not possible, restrict network access to the WebSocket interface to trusted clients only
  • Audit logs for any signs of exploitation prior to patching
  • Consider running the application in a sandboxed environment with minimal privileges

Patch Information

The vulnerability has been fixed in Cloud CLI version 1.25.0. The patch implements proper input sanitization for WebSocket message parameters before they are used in shell command construction.

Review the GitHub commit 12e7f07 for technical details on the fix implementation. The v1.25.0 release is available for download from the official GitHub repository.

For complete vulnerability details, refer to the GitHub Security Advisory GHSA-gv8f-wpm2-m5wr.

Workarounds

  • Implement network segmentation to restrict WebSocket access to trusted internal clients only
  • Deploy a reverse proxy or WAF to filter incoming WebSocket messages for malicious patterns
  • Run the Cloud CLI server with minimal OS privileges to limit the impact of successful exploitation
  • Disable the WebSocket shell functionality entirely if not required for operations
bash
# Example: Restrict WebSocket access using iptables (Linux)
# Allow only trusted internal subnet to access the WebSocket port
iptables -A INPUT -p tcp --dport 3000 -s 192.168.1.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 3000 -j DROP

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechCloud Cli

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.39%

  • 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-78
  • Technical References
  • GitHub Commit Update

  • GitHub Release v1.25.0

  • GitHub Security Advisory GHSA-gv8f-wpm2-m5wr
  • Related CVEs
  • CVE-2026-31862: Cloud CLI RCE Vulnerability

  • CVE-2026-31861: Cloud CLI Command Injection 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