CVE-2026-34060: CWE-94: Improper Control of Generation of Code ('Code Injection') in Shopify ruby-lsp
CVE-2026-34060 is a high-severity code injection vulnerability in Shopify's ruby-lsp prior to versions 0. 10. 2 and 0. 26. 9. The vulnerability arises because the rubyLsp. branch VS Code workspace setting is unsafely interpolated into a generated Gemfile without sanitization, allowing arbitrary Ruby code execution when a user opens a project with a malicious . vscode/settings. json file. Exploitation requires local access to open a compromised workspace and user interaction to trigger the code execution.
AI Analysis
Technical Summary
CVE-2026-34060 is a code injection vulnerability classified under CWE-94 affecting Shopify's ruby-lsp, an implementation of the Language Server Protocol for Ruby. The vulnerability exists because the rubyLsp.branch setting in VS Code workspace configurations is directly interpolated into a generated Gemfile without proper input sanitization or validation. This unsafe interpolation allows an attacker to inject arbitrary Ruby code via a malicious .vscode/settings.json file within a project workspace. When a user opens such a workspace, the injected code executes with the privileges of the user running the ruby-lsp process. This can lead to arbitrary code execution, compromising the confidentiality, integrity, and availability of the user's environment. The vulnerability affects ruby-lsp versions prior to 0.10.2 (Shopify.ruby-lsp) and 0.26.9 (ruby-lsp). Exploitation requires the attacker to place a malicious VS Code workspace configuration file and the user to open the workspace, thus requiring user interaction and local access. The vulnerability has been patched in the specified versions by sanitizing the input to prevent code injection. No public exploits have been reported to date, but the high CVSS score of 7.1 reflects the significant risk posed by this vulnerability due to its potential impact and ease of exploitation once the malicious workspace is opened.
Potential Impact
The impact of CVE-2026-34060 is substantial for organizations using vulnerable versions of ruby-lsp in their development environments. Successful exploitation allows arbitrary Ruby code execution, which can lead to unauthorized access to sensitive data, modification or destruction of code and files, and potential compromise of the developer's machine. This can cascade into supply chain risks if compromised development environments produce malicious or tampered software artifacts. Since ruby-lsp is used in developer tooling, the vulnerability primarily threatens software development teams, increasing the risk of insider threats or targeted attacks via malicious project repositories. The requirement for user interaction and local access limits remote exploitation but does not eliminate risk, especially in environments where developers open untrusted or third-party projects. The vulnerability can disrupt development workflows and erode trust in the integrity of software produced, impacting organizations globally that rely on Ruby and VS Code for development.
Mitigation Recommendations
To mitigate CVE-2026-34060, organizations should immediately update Shopify.ruby-lsp to version 0.10.2 or later and ruby-lsp to version 0.26.9 or later, where the vulnerability has been patched. Developers should audit their projects for untrusted or suspicious .vscode/settings.json files, especially those containing the rubyLsp.branch setting, and remove or sanitize them. Implement strict policies to avoid opening workspaces from untrusted sources or repositories. Employ workspace trust features in VS Code to restrict automatic execution of workspace settings and extensions. Additionally, consider sandboxing development environments or using containerized setups to limit the impact of potential code execution. Regularly monitor for updates and advisories from Shopify and related tooling vendors. Educate developers about the risks of opening unverified project configurations and encourage secure coding and workspace hygiene practices.
Affected Countries
United States, Canada, United Kingdom, Germany, France, Japan, Australia, India, Netherlands, Sweden
CVE-2026-34060: CWE-94: Improper Control of Generation of Code ('Code Injection') in Shopify ruby-lsp
Description
CVE-2026-34060 is a high-severity code injection vulnerability in Shopify's ruby-lsp prior to versions 0. 10. 2 and 0. 26. 9. The vulnerability arises because the rubyLsp. branch VS Code workspace setting is unsafely interpolated into a generated Gemfile without sanitization, allowing arbitrary Ruby code execution when a user opens a project with a malicious . vscode/settings. json file. Exploitation requires local access to open a compromised workspace and user interaction to trigger the code execution.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-34060 is a code injection vulnerability classified under CWE-94 affecting Shopify's ruby-lsp, an implementation of the Language Server Protocol for Ruby. The vulnerability exists because the rubyLsp.branch setting in VS Code workspace configurations is directly interpolated into a generated Gemfile without proper input sanitization or validation. This unsafe interpolation allows an attacker to inject arbitrary Ruby code via a malicious .vscode/settings.json file within a project workspace. When a user opens such a workspace, the injected code executes with the privileges of the user running the ruby-lsp process. This can lead to arbitrary code execution, compromising the confidentiality, integrity, and availability of the user's environment. The vulnerability affects ruby-lsp versions prior to 0.10.2 (Shopify.ruby-lsp) and 0.26.9 (ruby-lsp). Exploitation requires the attacker to place a malicious VS Code workspace configuration file and the user to open the workspace, thus requiring user interaction and local access. The vulnerability has been patched in the specified versions by sanitizing the input to prevent code injection. No public exploits have been reported to date, but the high CVSS score of 7.1 reflects the significant risk posed by this vulnerability due to its potential impact and ease of exploitation once the malicious workspace is opened.
Potential Impact
The impact of CVE-2026-34060 is substantial for organizations using vulnerable versions of ruby-lsp in their development environments. Successful exploitation allows arbitrary Ruby code execution, which can lead to unauthorized access to sensitive data, modification or destruction of code and files, and potential compromise of the developer's machine. This can cascade into supply chain risks if compromised development environments produce malicious or tampered software artifacts. Since ruby-lsp is used in developer tooling, the vulnerability primarily threatens software development teams, increasing the risk of insider threats or targeted attacks via malicious project repositories. The requirement for user interaction and local access limits remote exploitation but does not eliminate risk, especially in environments where developers open untrusted or third-party projects. The vulnerability can disrupt development workflows and erode trust in the integrity of software produced, impacting organizations globally that rely on Ruby and VS Code for development.
Mitigation Recommendations
To mitigate CVE-2026-34060, organizations should immediately update Shopify.ruby-lsp to version 0.10.2 or later and ruby-lsp to version 0.26.9 or later, where the vulnerability has been patched. Developers should audit their projects for untrusted or suspicious .vscode/settings.json files, especially those containing the rubyLsp.branch setting, and remove or sanitize them. Implement strict policies to avoid opening workspaces from untrusted sources or repositories. Employ workspace trust features in VS Code to restrict automatic execution of workspace settings and extensions. Additionally, consider sandboxing development environments or using containerized setups to limit the impact of potential code execution. Regularly monitor for updates and advisories from Shopify and related tooling vendors. Educate developers about the risks of opening unverified project configurations and encourage secure coding and workspace hygiene practices.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-25T16:21:40.866Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69cc1e09e6bfc5ba1d33b7f9
Added to database: 3/31/2026, 7:18:33 PM
Last enriched: 3/31/2026, 7:20:12 PM
Last updated: 3/31/2026, 9:30:51 PM
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.