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

CVE-2026-34060: Ruby LSP RCE Vulnerability

CVE-2026-34060 is a remote code execution flaw in Ruby LSP that allows arbitrary code execution via malicious workspace settings. This post covers the technical details, affected versions, impact, and mitigation.

Published: April 2, 2026

CVE-2026-34060 Overview

CVE-2026-34060 is a code injection vulnerability in Ruby LSP, an implementation of the language server protocol for Ruby. The vulnerability exists because the rubyLsp.branch VS Code workspace setting was interpolated without proper sanitization into a generated Gemfile. This allows attackers to achieve arbitrary Ruby code execution when a user opens a project containing a malicious .vscode/settings.json file.

Critical Impact

Arbitrary Ruby code execution when opening malicious projects in VS Code with Ruby LSP extension installed

Affected Products

  • Shopify.ruby-lsp versions prior to 0.10.2
  • ruby-lsp versions prior to 0.26.9
  • VS Code installations with vulnerable Ruby LSP extension

Discovery Timeline

  • March 31, 2026 - CVE-2026-34060 published to NVD
  • April 2, 2026 - Last updated in NVD database

Technical Details for CVE-2026-34060

Vulnerability Analysis

This vulnerability (CWE-94: Improper Control of Generation of Code) arises from insufficient input sanitization in the Ruby LSP extension's handling of workspace settings. When a developer opens a VS Code project, the extension reads configuration from .vscode/settings.json and uses the rubyLsp.branch setting value directly when generating a Gemfile for the project's language server environment.

The lack of sanitization means that specially crafted values in the branch setting can break out of the intended string context and inject arbitrary Ruby code. This code executes with the same privileges as the developer's user account when the Gemfile is processed by Bundler.

Root Cause

The root cause is improper input validation when interpolating user-controlled workspace settings into dynamically generated Ruby code. The rubyLsp.branch setting value was directly embedded into the generated Gemfile without escaping or validating the input, creating a code injection vulnerability. Any malicious content in this setting would be interpreted as Ruby code during Gemfile evaluation.

Attack Vector

The attack requires local access and user interaction. An attacker must convince a victim to open a malicious project (e.g., by cloning a repository containing a crafted .vscode/settings.json file). When the victim opens this project in VS Code with the vulnerable Ruby LSP extension installed, the malicious code embedded in the workspace settings executes automatically.

This attack vector is particularly concerning for developers who frequently clone and review external repositories, as simply opening a project triggers the vulnerability without any additional user action beyond the initial project opening.

The vulnerability mechanism works as follows: The malicious .vscode/settings.json file contains a crafted rubyLsp.branch value with embedded Ruby code. When Ruby LSP generates the internal Gemfile, this value is interpolated without sanitization. Bundler then evaluates this Gemfile, executing the injected code with the developer's privileges. For detailed technical information, see the GitHub Security Advisory.

Detection Methods for CVE-2026-34060

Indicators of Compromise

  • Suspicious .vscode/settings.json files in cloned repositories containing unusual rubyLsp.branch values
  • Unexpected process execution originating from VS Code or Ruby LSP processes
  • Anomalous network connections initiated during project opening in VS Code
  • Presence of unfamiliar Ruby code in generated Gemfiles within the Ruby LSP cache directories

Detection Strategies

  • Monitor file system activity for creation or modification of .vscode/settings.json files with suspicious content patterns
  • Implement code review processes for .vscode/ directories in external repositories before opening projects
  • Deploy endpoint detection to identify Ruby process spawning unexpected child processes during VS Code usage
  • Use SentinelOne's behavioral AI to detect anomalous code execution patterns originating from development tools

Monitoring Recommendations

  • Enable logging for VS Code extension activities and Ruby LSP operations
  • Monitor for unexpected outbound network connections from development environments
  • Track process genealogy to identify suspicious child processes spawned by VS Code or Bundler
  • Implement alerting for attempts to modify or access sensitive files from Ruby processes

How to Mitigate CVE-2026-34060

Immediate Actions Required

  • Update Shopify.ruby-lsp extension to version 0.10.2 or later
  • Update ruby-lsp gem to version 0.26.9 or later
  • Review recently opened projects for suspicious .vscode/settings.json files
  • Audit development machines for signs of compromise if unknown repositories were recently opened

Patch Information

Shopify has released patched versions that properly sanitize the rubyLsp.branch setting before interpolation. Users should update to Shopify.ruby-lsp version 0.10.2 or ruby-lsp version 0.26.9. The fix ensures that workspace settings are properly escaped before being included in generated Gemfiles, preventing code injection attacks.

For more information, see the GitHub Release v0.26.9 and the GitHub Security Advisory GHSA-c4r5-fxqw-vh93.

Workarounds

  • Temporarily disable the Ruby LSP extension until updates can be applied
  • Manually inspect .vscode/settings.json files in repositories before opening projects
  • Remove or reset the rubyLsp.branch setting from workspace configurations in untrusted projects
  • Configure VS Code workspace trust settings to restrict extension functionality in untrusted folders
bash
# Update Ruby LSP gem to patched version
gem update ruby-lsp

# Or install specific patched version
gem install ruby-lsp -v '0.26.9'

# Verify installed version
gem list ruby-lsp

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechRuby Lsp

  • SeverityHIGH

  • CVSS Score7.1

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/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
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Release v0.26.9

  • GitHub Security Advisory GHSA-c4r5-fxqw-vh93
  • Latest CVEs
  • CVE-2026-40322: SiYuan Knowledge Management RCE Vulnerability

  • CVE-2026-40318: SiYuan Path Traversal Vulnerability

  • CVE-2026-40259: SiYuan Auth Bypass Vulnerability

  • CVE-2026-40255: AdonisJS HTTP Server CSRF 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