Four VS Code MCP and agent mode vulnerabilities can let malicious servers run code
VS Code: four MCP and agent flaws let a hostile server run code
Microsoft released four Visual Studio Code security advisories on November 10, 2026; the vulnerabilities were fixed in 1.145.3, and 1.145.2 and earlier versions are affected on all platforms, with three involving the MCP client and one involving agent mode. CVE-2026-120779 is a CVSS 9.6 remote code execution vulnerability in which a connected MCP server can turn elicitation notification text into clickable command links, and clicking them runs code; the other vulnerabilities include a crafted vscode:mcp/install link carrying command input not shown in the preview, older SSE transport not validating the origin of server endpoints, and CVE-2026-120782 treating local command syntax in agent messages as user input and bypassing terminal approval, affecting users who use agent mode to process instructions from untrusted repositories. Microsoft said none of the four vulnerabilities has known exploitation in the wild, rated exploitation likelihood as low, and said the VS Code team discovered and fixed them itself on the same day.
Three of the four vulnerabilities require connecting to an MCP server or opening an install link, while the agent mode vulnerability can be triggered through instructions from an untrusted repository; developers who commonly use that mode can check their version accordingly.