Arbitrary Code Injection Affecting ruby-lsp package, versions <0.26.9


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.06% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-RUBYLSP-15812239
  • published29 Mar 2026
  • disclosed27 Mar 2026
  • creditUnknown

Introduced: 27 Mar 2026

NewCVE-2026-34060  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade ruby-lsp to version 0.26.9 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Injection via unsanitized interpolation of the branch setting in the Gemfile generation process. An attacker can execute arbitrary Ruby code by crafting a malicious .vscode/settings.json or equivalent workspace configuration that is automatically applied when the editor opens and the workspace is trusted. This is only exploitable if the user opens and trusts a workspace containing a malicious configuration file.

CVSS Base Scores

version 4.0
version 3.1