GHSA-c4r5-fxqw-vh93

Suggest an improvement
Source
https://github.com/advisories/GHSA-c4r5-fxqw-vh93
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-c4r5-fxqw-vh93/GHSA-c4r5-fxqw-vh93.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-c4r5-fxqw-vh93
Aliases
  • CVE-2026-34060
Published
2026-03-27T19:43:14Z
Modified
2026-03-31T18:51:14.297816Z
Severity
  • 7.1 (High) CVSS_V4 - 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 CVSS Calculator
Summary
Ruby LSP has arbitrary code execution through branch setting
Details

Summary

The rubyLsp.branch VS Code workspace setting was interpolated without sanitization into a generated Gemfile, allowing arbitrary Ruby code execution when a user opens a project containing a malicious .vscode/settings.json.

Other editors that support workspace setting that get automatically applied upon opening the editor and trusting the workspace are also impacted since the server is the component that performs the interpolation.

Details

The branch CLI argument passed to the ruby-lsp server was interpolated in the generated .ruby-lsp/Gemfile without sanitization. Editors that allow defining settings saved at the workspace level (e.g.: .vscode/settings.json) that gets automatically applied open the possibility to craft a malicious repository that once opened and trusted in the editor would run arbitrary code.

Impact

Code execution with the privileges of the user who opens the malicious project. Ruby LSP assumes workspace code is trusted and so opening the editor on an untrusted workspace can lead to executing potentially dangerous code.

Remediation

The rubyLsp.branch setting has been removed entirely. VS Code extensions auto-update by default, so most users will receive the fix without action. Users who have disabled auto-updates should update to extension version >= 0.10.2.

The branch CLI flag was also entirely removed from the ruby-lsp gem. For users that don't add ruby-lsp to their Gemfiles, the server should auto-update. Users with the ruby-lsp in the Gemfile and locked to a specific version should update to >= 0.26.9.

Database specific
{
    "nvd_published_at": "2026-03-31T03:15:58Z",
    "cwe_ids": [
        "CWE-94"
    ],
    "github_reviewed_at": "2026-03-27T19:43:14Z",
    "github_reviewed": true,
    "severity": "HIGH"
}
References

Affected packages

RubyGems / ruby-lsp

Package

Name
ruby-lsp
Purl
pkg:gem/ruby-lsp

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.26.9

Affected versions

0.*
0.0.1
0.0.2
0.0.3
0.0.4
0.1.0
0.2.0
0.2.1
0.2.2
0.2.3
0.2.4
0.3.0
0.3.1
0.3.2
0.3.3
0.3.4
0.3.5
0.3.6
0.3.7
0.3.8
0.4.0
0.4.1
0.4.2
0.4.3
0.4.4
0.4.5
0.5.0
0.5.1
0.6.0
0.6.1
0.6.2
0.7.0
0.7.1
0.7.2
0.7.3
0.7.4
0.7.5
0.7.6
0.8.0
0.8.1
0.9.0
0.9.1
0.9.2
0.9.3
0.9.4
0.10.0
0.10.1
0.11.0
0.11.1
0.11.2
0.12.0
0.12.1
0.12.2
0.12.3
0.12.4
0.12.5
0.13.0
0.13.1
0.13.2
0.13.3
0.13.4
0.14.0
0.14.1
0.14.2
0.14.3
0.14.4
0.14.5
0.14.6
0.15.0
0.16.0
0.16.1
0.16.2
0.16.3
0.16.4
0.16.5
0.16.6
0.16.7
0.17.0
0.17.1
0.17.2
0.17.3
0.17.4
0.17.5
0.17.6
0.17.7
0.17.8
0.17.9
0.17.10
0.17.11
0.17.12
0.17.13
0.17.14
0.17.15
0.17.16
0.17.17
0.18.0
0.18.1
0.18.2
0.18.3
0.18.4
0.19.0
0.19.1
0.20.0
0.20.1
0.21.0
0.21.1
0.21.2
0.21.3
0.22.0
0.22.1
0.23.0
0.23.1
0.23.2
0.23.3
0.23.4
0.23.5
0.23.6
0.23.7
0.23.8
0.23.9
0.23.10
0.23.11
0.23.12
0.23.13
0.23.14
0.23.15
0.23.16
0.23.17
0.23.18
0.23.19
0.23.20
0.23.21
0.23.22
0.23.23
0.23.24
0.24.0
0.24.1
0.24.2
0.25.0
0.26.0
0.26.1
0.26.2
0.26.3
0.26.4
0.26.5
0.26.6
0.26.7
0.26.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-c4r5-fxqw-vh93/GHSA-c4r5-fxqw-vh93.json"