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.
Originally disclosed on Microsoft
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
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
- Obtain or create a malicious .code-workspace file.
- Entice the victim to open that file in Visual Studio Code.
- 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.