Skip to content
Access control Advisory Intermediate CVE-2026-121665

Visual Studio Code Security Feature Bypass Vulnerability (CVE-2026-121665)

Visual Studio Code's Workspace Trust feature could be bypassed by a crafted workspace and an attacker-controlled notification, letting an untrusted workspace apply settings that should be blocked. This could allow commands to run in the user's context without the user granting trust.

Althaf Shajahan Follow

Originally disclosed on Microsoft

High 8.8 View original

Description

Trust boundary violation in Visual Studio Code allows an unauthorized attacker to bypass a security feature 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 and click an attacker-controlled notification. Successful exploitation could bypass Workspace Trust protections and allow commands to run in the context of the user without the user granting trust. The attacker does not require authentication.

FAQ

What security feature could be bypassed by successfully exploiting this vulnerability? Successful exploitation could allow an untrusted workspace to apply settings that should be blocked by Visual Studio Code's Workspace Trust protections. The user must open the attacker-controlled workspace.

Visual Studio Code

Visual Studio Code

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Althaf Shajahan. 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 trust boundary violation where an untrusted workspace can influence settings or notifications that should be gated by Workspace Trust.

Impact

An attacker could bypass Workspace Trust and run commands as the user, but the user must open the crafted workspace and click the notification.

What the attacker needed

Victim opens a crafted workspace; victim clicks an attacker notification

How it was found

  1. Create a specially crafted Visual Studio Code workspace.
  2. Convince the user to open the workspace.
  3. Get the user to click an attacker-controlled notification.
  4. The workspace applies settings that should be blocked and commands run without trust being granted.

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 code editor, and Workspace Trust is a safety switch that stops a downloaded project from running code automatically. Here, a malicious project could trick the editor into treating itself as trusted after the user clicks a notification, so code could run without permission.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.