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

CVE-2026-31861: Cloud CLI Command Injection RCE Vulnerability

CVE-2026-31861 is a command injection RCE vulnerability in Cloud CLI that enables authenticated attackers to execute arbitrary OS commands through the git configuration endpoint. This article covers technical details, impact, and mitigations.

Published: March 13, 2026

CVE-2026-31861 Overview

Cloud CLI (aka Claude Code UI) is a desktop and mobile UI for Claude Code, Cursor CLI, Codex, and Gemini-CLI. Prior to version 1.24.0, a critical command injection vulnerability exists in the /api/user/git-config endpoint. The endpoint constructs shell commands by interpolating user-supplied gitName and gitEmail values into command strings passed to child_process.exec(). While the input is placed within double quotes and only the double-quote character (") is escaped, dangerous shell metacharacters including backticks (`), $() command substitution, and \\ escape sequences are all interpreted within double-quoted strings in bash. This allows authenticated attackers to execute arbitrary OS commands via the git configuration endpoint.

Critical Impact

Authenticated attackers can achieve full remote code execution on systems running Cloud CLI versions prior to 1.24.0 by exploiting improper input sanitization in the git configuration API endpoint.

Affected Products

  • Cloud CLI (Claude Code UI) versions prior to 1.24.0
  • Desktop installations of Claude Code UI
  • Mobile installations of Claude Code UI

Discovery Timeline

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

Technical Details for CVE-2026-31861

Vulnerability Analysis

This vulnerability is classified as CWE-94 (Code Injection), specifically manifesting as an OS command injection flaw. The vulnerable code path exists in the /api/user/git-config endpoint within the server/routes/user.js file. The application uses Node.js child_process.exec() to execute git commands, constructing the command string by directly interpolating user-controlled values.

The fundamental issue is incomplete input sanitization. While the developers attempted to prevent injection by escaping double-quote characters, they failed to account for other shell metacharacters that are interpreted within double-quoted bash strings. An attacker with valid authentication can craft malicious gitName or gitEmail values containing backticks or $() syntax to inject and execute arbitrary system commands with the privileges of the Node.js process.

Root Cause

The root cause is the use of child_process.exec() with string concatenation to build shell commands from user input. The exec() function spawns a shell (typically /bin/sh or bash) to interpret the command string, which inherently processes shell metacharacters. The incomplete escaping strategy only addressed double-quote characters but left command substitution syntax ($() and backticks) and backslash escape sequences vulnerable to exploitation.

Attack Vector

The attack requires network access and valid authentication credentials to the Cloud CLI application. An authenticated attacker can send a crafted HTTP request to the /api/user/git-config endpoint with malicious payload in the gitName or gitEmail parameters. For example, a gitEmail value containing `whoami` or $(id) would result in command execution when the application constructs and executes the git configuration command.

The security patch addresses this by replacing child_process.exec() with child_process.spawn() and explicitly setting shell: false. This ensures that arguments are passed directly to the command without shell interpretation, eliminating the command injection attack surface entirely.

javascript
 import { userDb } from '../database/db.js';
 import { authenticateToken } from '../middleware/auth.js';
 import { getSystemGitConfig } from '../utils/gitConfig.js';
-import { exec } from 'child_process';
-import { promisify } from 'util';
+import { spawn } from 'child_process';
 
-const execAsync = promisify(exec);
 const router = express.Router();
 
+function spawnAsync(command, args, options = {}) {
+  return new Promise((resolve, reject) => {
+    const child = spawn(command, args, { ...options, shell: false });
+    let stdout = '';
+    let stderr = '';
+    child.stdout.on('data', (data) => { stdout += data.toString(); });
+    child.stderr.on('data', (data) => { stderr += data.toString(); });
+    child.on('error', (error) => { reject(error); });
+    child.on('close', (code) => {
+      if (code === 0) { resolve({ stdout, stderr }); return; }
+      const error = new Error(`Command failed: ${command} ${args.join(' ')}`);
+      error.code = code;
+      error.stdout = stdout;
+      error.stderr = stderr;
+      reject(error);
+    });
+  });
+}
+
 router.get('/git-config', authenticateToken, async (req, res) => {

Source: GitHub Commit

Detection Methods for CVE-2026-31861

Indicators of Compromise

  • Unusual POST/PUT requests to /api/user/git-config containing shell metacharacters (backticks, $(), $(, backslashes) in gitName or gitEmail parameters
  • Unexpected child processes spawned by the Node.js application process
  • Anomalous system command execution patterns originating from the Cloud CLI service
  • Web server logs showing encoded or malformed email/name values in git configuration requests

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and block requests containing shell metacharacters in the git-config endpoint parameters
  • Monitor Node.js process spawning behavior for unexpected child processes, particularly shells or system utilities
  • Enable and review application-level logging for the /api/user/git-config endpoint to identify suspicious input patterns
  • Deploy endpoint detection and response (EDR) solutions to identify command injection exploitation attempts

Monitoring Recommendations

  • Configure alerting for requests to /api/user/git-config containing patterns matching command substitution syntax
  • Monitor for unusual network connections or file system access originating from the Cloud CLI process
  • Implement application performance monitoring (APM) to track abnormal execution times that may indicate exploitation attempts
  • Review authentication logs for accounts making repeated requests to the vulnerable endpoint

How to Mitigate CVE-2026-31861

Immediate Actions Required

  • Upgrade Cloud CLI (Claude Code UI) to version 1.24.0 or later immediately
  • If immediate upgrade is not possible, temporarily disable or restrict access to the /api/user/git-config endpoint
  • Review server logs for evidence of exploitation attempts prior to patching
  • Rotate any credentials or tokens that may have been exposed if compromise is suspected

Patch Information

The vulnerability has been fixed in Cloud CLI version 1.24.0. The patch replaces the vulnerable child_process.exec() implementation with child_process.spawn() using the shell: false option, which prevents shell interpretation of user input. Users should upgrade to version 1.24.0 or later by following the instructions in the GitHub Release v1.24.0. Additional details are available in the GitHub Security Advisory GHSA-7fv4-fmmc-86g2.

Workarounds

  • Implement a reverse proxy or WAF rule to sanitize or reject requests containing shell metacharacters to the /api/user/git-config endpoint
  • Restrict network access to the Cloud CLI application to trusted IP ranges or VPN only
  • Temporarily disable the git configuration functionality by modifying server routing until the patch can be applied
  • Implement additional authentication requirements for the affected endpoint as a defense-in-depth measure
bash
# Example: Block suspicious requests at nginx level (temporary workaround)
# Add to nginx server configuration
location /api/user/git-config {
    # Reject requests containing common command injection patterns
    if ($request_body ~* "(\$\(|`|\\\\)") {
        return 403;
    }
    proxy_pass http://localhost:3000;
}

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.04%

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

  • GitHub Release v1.24.0

  • GitHub Security Advisory GHSA-7fv4-fmmc-86g2
  • Related CVEs
  • CVE-2026-31975: Cloud CLI OS Command Injection Vulnerability

  • CVE-2026-31862: Cloud CLI 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