7.8high
Roslyn CodeLens MCP Server: Untrusted Roslyn Analyzer Execution via get_diagnostics Leads to Arbitrary Code Execution
- Severity
- 7.8high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.21% (higher than 6% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| MarcelRoozekrans roslyn-codelens-mcp | >= 0.0.9, < 1.17.0 | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
NVD (es)
Roslyn CodeLens MCP Server es un servidor MCP basado en Roslyn que proporciona inteligencia de código semántica para bases de código .NET. Desde la versión 0.0.9 hasta la 1.17.0, la herramienta MCP get_diagnostics carga y ejecuta todos los ensamblados DiagnosticAnalyzer referenciados por la solución objetivo sin ninguna lista de permitidos, verificación de firma o confirmación del usuario; includeAnalyzers tiene un valor predeterminado de true, por lo que no se requiere una aceptación explícita. Un atacante que puede colocar un archivo .csproj malicioso que referencia una DLL controlada por el atacante en una ubicación que la víctima abre con el servidor MCP logrará la ejecución de código arbitrario en el proceso del servidor con los privilegios del sistema operativo del servidor. Esta vulnerabilidad está corregida en la versión 1.17.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-45555 changed 2026-05-29 | CVE Terms of Use |
| NVD | CVE-2026-45555 changed 2026-07-21 | Public domain |