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

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

Visual Studio Code performed an incomplete comparison that let a crafted workspace bypass the Workspace Trust feature. An attacker who persuaded a user to open such a workspace could make the editor connect to an attacker-controlled service and run commands or code without the user granting trust.

陳宥升 Follow with ko41a

Originally disclosed on Microsoft

High 9.6 View original

Description

Incomplete comparison with missing factors 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. The workspace could cause Visual Studio Code to connect to an attacker-controlled service and bypass Workspace Trust restrictions. Successful exploitation could allow the attacker to access local data or execute code in the context of the user. User interaction is required, but the user does not need to trust the workspace.

FAQ

What security feature could be bypassed by successfully exploiting this vulnerability? An attacker who successfully exploited this vulnerability could bypass the Visual Studio Code Workspace Trust feature, allowing content from an untrusted workspace to run commands or code without the user first granting trust. See Workspace Trust for more information.

FAQ

According to the CVSS metric, a successful exploitation could lead to a scope change (S:C). What does this mean for this vulnerability? In this case, a successful attack can break out of the Visual Studio Code Workspace Trust feature. See Workspace Trust for more information.

Visual Studio Code

Visual Studio Code

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by 陳宥升 (CheN..). 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 an incomplete comparison in the trust-checking logic, so some workspace content was not properly evaluated against the Workspace Trust rules.

Impact

Successful exploitation could let the attacker access local data or execute code as the user; user interaction is required, but the user does not need to trust the workspace.

What the attacker needed

Victim opens a crafted workspace; user interaction required; no trust grant 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.

Workspace Trust is a safety setting in Visual Studio Code that asks you to confirm before running code from a folder you have not opened before. This bug meant a specially made workspace could skip that confirmation and run things anyway. An attacker only needs you to open their workspace file, not to click 'trust'.

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 by 陳宥升

View all

3 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.

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.