Skip to content
RCE Advisory Intermediate CVE-2026-70336

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

Visual Studio Code contains a code injection flaw that lets an unauthorised attacker execute code over a network. An attacker could craft a malicious link or web page and use social engineering to convince a user to open it in VS Code, leading to code execution in the user's connected development environment.

Rayhan Destian Follow

Originally disclosed on Microsoft

High 8.8 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 attacker could craft a malicious link or web page and use social engineering to convince a user to open it in Visual Studio Code. Successful exploitation could result in code execution in the user's connected development environment. User interaction is required to open the attacker-supplied link, and no authentication is needed.

Visual Studio Code

Visual Studio Code

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Rayhan Destian. 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 control of code generation (code injection) in Visual Studio Code, though the text does not specify the exact mechanism.

Impact

Successful exploitation could result in code execution in the user's connected development environment, but user interaction is required to open the attacker-supplied link.

What the attacker needed

Victim opens a malicious link or page; user interaction required; no authentication needed

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. This bug means that if you open a specially crafted link or web page in the editor, an attacker could run their own code on your machine or in your development environment. You would have to be tricked into opening the link, so the attack relies on social engineering.

What is RCE?

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

More by Rayhan Destian

View all

2 more disclosed reports, best first.

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.