Visual Studio Code Security Feature Bypass Vulnerability (CVE-2026-102851)
Visual Studio Code assigned privileges incorrectly, so a sandboxed MCP server could write into the directory of another sandboxed server. An attacker who convinced a user to add and start a crafted server alongside a legitimate one could bypass the per-server sandbox and potentially run code with the other server's permissions.
Myungyong Lee Follow with thegoldmandm
Originally disclosed on Microsoft
Description
Incorrect privilege assignment in Visual Studio Code allows an authorized attacker to bypass a security feature locally.
FAQ
How could an attacker exploit this vulnerability? An attacker could convince a user to add and start a specially crafted sandboxed MCP server alongside another sandboxed server in Visual Studio Code. Successful exploitation could allow the attacker-controlled server to write into the other server's directory, bypassing the per-server sandbox policy and potentially executing code under the other server's permissions. User interaction is required to add and start the servers.
FAQ
According to the CVSS metric, the attack complexity is high (AC:H). What does this mean for this vulnerability? An attacker would need specific conditions to be in place (i.e. particular protocol settings, or configurations, etc.) before an attack could succeed, which reduces the likelihood of widespread or opportunistic exploitation.
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
Root cause
Likely the sandbox policy for each MCP server was not enforced per server, so one server's file access was not confined to its own directory.
Impact
An attacker-controlled server could write into another server's directory and potentially execute code under that server's permissions, though user interaction is required and the high attack complexity limits widespread exploitation.
What the attacker needed
Victim adds a crafted MCP server; victim starts it alongside another server; specific configuration conditions
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 can run small helper programs called MCP servers, and each one is meant to be kept in its own sealed box so it cannot touch the others. Here the sealing was faulty: one box could reach into a neighbour's folder. If someone tricks you into adding a malicious helper next to a trusted one, the malicious one may be able to act with the trusted one's powers.
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.