mcp.json) | High | 8.8| Field | Value |
|---|---|
| CVE / NVD | CVE-2026-21518 |
| EPSS score | 0.013570000 (FIRST EPSS, 2026-06-30) |
| Date (index) | 2026-02-10 |
| Affected product (index) | Microsoft Visual Studio Code and GitHub Copilot (mcp.json handling) |
| GHSA ID | N/A (Microsoft MSRC advisory) |
| OWASP MCP Top 10 (2025) | MCP04 — Software Supply Chain Attacks & Dependency Tampering |
| Published / disclosed | 2026-02-10 |
| Ecosystem | N/A (desktop IDE) |
| Component | VS Code MCP configuration (mcp.json) |
| CVSS score | 8.8 (v3.1, Microsoft CNA) |
| CWE | CWE-77 |
| Affected versions | Visual Studio Code < 1.109.2 (per NVD CPE) |
| Fixed versions | 1.109.2 and later (per NVD / MSRC) |
| Fix status | Patched |
| Exploit status | Public CVE record |
Improper neutralization of special elements used in a command (command injection) in GitHub Copilot and Visual Studio Code allows an unauthorized attacker to bypass a security feature over a network. The flaw is in handling of mcp.json files: user-supplied strings are used in system calls without adequate validation, enabling code execution in the context of the current user when a malicious project is opened.
User interaction is required: the victim must open a malicious project (or workspace) that ships or updates mcp.json with attacker-controlled command strings. Remote attack over a network is possible per Microsoft CNA vector (UI:R).
Lack of validation on MCP server launch parameters read from mcp.json before invoking OS commands.
mcp.json is the standard VS Code mechanism for registering MCP servers (stdio commands and args). Poisoned project config turns repository trust into local RCE—similar in class to Cursor/Claude Code MCP config swap issues (for example CVE-2025-54136, CVE-2025-59536).
VS Code processes mcp.json server definitions and executes configured commands without fully neutralizing shell metacharacters in user-supplied fields.
Apply Microsoft’s security update for Visual Studio Code 1.109.2 or later. Treat untrusted repositories as capable of malicious .vscode/mcp.json or workspace-level MCP config.
mcp.json in cloned repositories before opening the folder in VS Code.ZDI-26-253 documents remote code execution via malicious mcp.json; do not mirror weaponized project templates in this repository.
mcp.json entries pointing to non-standard binaries or shell-invoking command lines.
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-21518