Visual Studio Code Elevation of Privilege Vulnerability (CVE-2026-41613)
Visual Studio Code contained a session fixation flaw in its MCP Server integration, so an attacker could take over an existing session. By persuading a user to open a malicious file, the attacker could gain the permissions of the MCP Server's managed identity and act on whatever resources that identity can reach.
Description
Session fixation 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 the vulnerability? A successful attacker could obtain the permissions associated with the MCP Server’s managed identity. This may allow the attacker to access or perform actions on any resources that the managed identity is authorized to reach. The attacker does not gain broader tenant‑level or administrator permissions; only those tied to the compromised managed identity.
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 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 obtain the permissions of the MCP Server's managed identity and act on resources it can reach, though not tenant-level or administrator permissions.
What the attacker needed
Victim opens a malicious file in VS Code; attacker can reach the MCP Server over the network
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.
A session is the logged-in state a program keeps after you connect or sign in. Session fixation means an attacker can plant or reuse a session so that they end up sharing the victim's logged-in state instead of needing their password. Here the victim has to open a booby-trapped file in the editor, and the attacker then inherits the rights of a service account the editor uses.
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.