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

Visual Studio Code Elevation of Privilege Vulnerability (CVE-2026-47281)

Visual Studio Code lacks an authorisation check, so an attacker can craft a malicious workspace file that, when opened, lets them gain SYSTEM-level privileges. The impact is not confined to the editor but can reach the user's local files and settings.

Adam Baldwin Follow

Originally disclosed on Microsoft

High 9.6 View original

Description

Missing authorization in Visual Studio Code allows an unauthorized attacker to elevate privileges over a network.

FAQ

What privileges could be gained by an attacker who successfully exploited this vulnerability? An attacker who successfully exploited this vulnerability could gain SYSTEM privileges.

FAQ

According to the CVSS metric, a successful exploitation could lead to a scope change (S:C). What does this mean for this vulnerability? This means that a successful attack is not limited to Visual Studio Code itself, but can also affect the user’s local system, including files and settings. As a result, the impact extends beyond the application to a different security boundary, increasing the overall severity of the vulnerability.

FAQ

According to the CVSS metric, user interaction is required (UI:R). What interaction would the user have to do? The user would have be enticed to open a malicious .code-workspace file in vscode. Users should never open anything that they do not know or trust to be safe.

Visual Studio Code

Visual Studio Code

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Adam Baldwin with https://evilpacket.net/. 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

Impact

An attacker could gain SYSTEM privileges, and the effect could extend beyond the editor to the user's local files and settings.

What the attacker needed

Victim opens a malicious workspace file; user must trust or be tricked into opening it

How it was found

  1. Obtain or create a malicious .code-workspace file.
  2. Entice the victim to open that file in Visual Studio Code.
  3. The missing authorisation check lets the attacker gain SYSTEM privileges.

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. A workspace file is a small settings file that tells the editor which folders and options to load. Here the editor trusted that file too much: opening a crafted one could let an attacker run with the highest rights on the machine, called SYSTEM on Windows, which is above a normal administrator.

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.