Description
Roslyn CodeLens MCP Server is a Roslyn-based MCP server providing semantic code intelligence for .NET codebases. From 0.0.9 to 1.17.0, the get_diagnostics MCP tool loads and executes all DiagnosticAnalyzer assemblies referenced by the target solution without any allowlist, signature check, or user confirmation; includeAnalyzers defaults to true, so no explicit opt-in is required. An attacker who can place a malicious .csproj referencing an attacker-controlled DLL in a location the victim opens with the MCP server will achieve arbitrary code execution in the server process with the server's OS privileges. This vulnerability is fixed in 1.17.0.
Published: 2026-05-29
Score: 7.8 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises because the Roslyn CodeLens MCP Server loads and executes all DiagnosticAnalyzer assemblies referenced by a target solution without any allowlist, signature check or user confirmation. This allows an attacker who can insert a malicious project file that references a DLL hosted at a location the victim opens with the MCP server to trigger execution of arbitrary code within the server process, elevating to the privileges with which the server runs. The weakness is a form of code injection or dynamic code execution (CWE‑94) and enables full compromise of the server host.

Affected Systems

The affected product is MarcelRoozekrans:roslyn‑codelens‑mcp. Versions from 0.0.9 up to but excluding 1.17.0 are vulnerable; the vulnerability has been fixed in 1.17.0 and later releases.

Risk and Exploitability

The CVSS score of 7.8 indicates a high impact severity. The EPSS score is not available, and the vulnerability is not listed in CISA’s KEV catalog, though the exploit path is relatively straightforward: an attacker controls a project file and places a malicious DLL in a location the victim will open. Once the MCP server processes that file, the attacker achieves arbitrary code execution with server OS privileges. This poses a critical risk to any environment where the MCP server is used to analyze codebases, especially if exposed to untrusted projects.

Generated by OpenCVE AI on May 29, 2026 at 15:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Roslyn CodeLens MCP Server version 1.17.0 or later to eliminate the flaw.
  • If an upgrade cannot be applied immediately, disable automatic analyzer loading by setting includeAnalyzers to false or otherwise restrict the analyzer path to a signed, allowlisted set of assemblies.
  • Restrict the MCP server to accept only trusted project files from secure directories and enforce strict file‑system access controls to prevent unauthorized placement of malicious DLLs.

Generated by OpenCVE AI on May 29, 2026 at 15:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 29 May 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 29 May 2026 16:00:00 +0000

Type Values Removed Values Added
First Time appeared Marcelroozekrans
Marcelroozekrans roslyn-codelens-mcp
Vendors & Products Marcelroozekrans
Marcelroozekrans roslyn-codelens-mcp

Fri, 29 May 2026 13:45:00 +0000

Type Values Removed Values Added
Description Roslyn CodeLens MCP Server is a Roslyn-based MCP server providing semantic code intelligence for .NET codebases. From 0.0.9 to 1.17.0, the get_diagnostics MCP tool loads and executes all DiagnosticAnalyzer assemblies referenced by the target solution without any allowlist, signature check, or user confirmation; includeAnalyzers defaults to true, so no explicit opt-in is required. An attacker who can place a malicious .csproj referencing an attacker-controlled DLL in a location the victim opens with the MCP server will achieve arbitrary code execution in the server process with the server's OS privileges. This vulnerability is fixed in 1.17.0.
Title Roslyn CodeLens MCP Server: Untrusted Roslyn Analyzer Execution via get_diagnostics Leads to Arbitrary Code Execution
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Marcelroozekrans Roslyn-codelens-mcp
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-29T16:23:08.979Z

Reserved: 2026-05-12T17:48:47.880Z

Link: CVE-2026-45555

cve-icon Vulnrichment

Updated: 2026-05-29T16:22:27.221Z

cve-icon NVD

Status : Received

Published: 2026-05-29T14:16:30.113

Modified: 2026-05-29T18:17:09.893

Link: CVE-2026-45555

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-29T15:46:32Z

Weaknesses