Skip to content
RCE Advisory Intermediate CVE-2026-120779

Visual Studio Code Remote Code Execution Vulnerability (CVE-2026-120779)

Visual Studio Code contains a code injection flaw in how it handles remote MCP servers. An unauthenticated attacker who controls a malicious MCP server could convince a user to connect and click a crafted notification link, leading to code execution with the user's permissions.

Dohyeok Kim Follow

Originally disclosed on Microsoft

High 9.6 View original

Description

Improper control of generation of code ('code injection') in Visual Studio Code allows an unauthorized attacker to execute code over a network.

FAQ

How could an attacker exploit this vulnerability? An unauthenticated attacker who controls a remote MCP server could convince a user to connect Visual Studio Code to that server and click a specially crafted link in a notification. Successful exploitation could allow the attacker to execute code with the user's permissions.

Visual Studio Code

Visual Studio Code

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Dohyeok Kim (@dohki). Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely improper neutralisation of user-supplied input in notification links, allowing code injection when connected to a remote MCP server.

Impact

Successful exploitation could allow the attacker to execute code with the user's permissions.

What the attacker needed

Attacker controls a remote MCP server; victim connects VS Code to that server; victim clicks a crafted notification link

How it was found

  1. An attacker controls a remote MCP server.
  2. The attacker convinces a user to connect Visual Studio Code to that server.
  3. The attacker sends a notification with a specially crafted link.
  4. The user clicks the link, leading to code execution.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Visual Studio Code is a popular code editor. It can connect to remote helper servers called MCP servers. This report says a malicious helper server could trick the editor into running harmful code if the user clicks a link in a notification. The attacker needs the user to connect to their server and click the link.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.