Skip to content
RCE Advisory Intermediate CVE-2026-70098

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

Visual Studio Code lacked proper authorisation checks, so a crafted workspace could bypass Workspace Trust and run attacker-controlled code as the user. The attacker only needs to convince the user to open the workspace; no trust prompt needs to be accepted.

Mo Sakr Follow

Originally disclosed on Microsoft

High 8.8 View original

Description

Missing authorization 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 convince a user to open a specially crafted Visual Studio Code workspace. Successful exploitation could bypass Workspace Trust protections and allow attacker-controlled content to execute code in the context of the user. User interaction is required, but the user does not need to grant trust.

Visual Studio Code

Visual Studio Code

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Mo Sakr. 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 a missing authorisation check in how Visual Studio Code handles workspace trust, allowing a crafted workspace to execute code without the user granting trust.

Impact

An attacker could execute code in the context of the user, but user interaction is required and the user does not need to grant trust.

What the attacker needed

Victim opens a crafted workspace

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 has a safety feature called Workspace Trust that asks you to approve a folder before running its code. Here, a malicious workspace could skip that approval and run code on your computer just by being opened.

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 Mo Sakr

View all

1 more disclosed report, 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.