Visual Studio Code Elevation of Privilege Vulnerability (CVE-2025-24039)
Visual Studio Code had an elevation of privilege vulnerability where an attacker with standard user privileges could place a malicious file on the Visual Studio Code server and wait for a privileged victim to run the server. Successful exploitation would give the attacker the rights of the user running the affected application.
FAQ
What privileges could be gained by an attacker who successfully exploited the vulnerability? The attacker would gain the rights of the user that is running the affected application.
FAQ
According to the CVSS metric, user interaction is required (UI:R) and privileges required is low (PR:L). What does that mean for this vulnerability? An authorized attacker with standard user privileges could place a malicious file on the Visual Code server and then wait for the privileged victim to run the server.
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 the rights of the user running the affected application, which may be higher than their own.
What the attacker needed
Attacker has standard user privileges; ability to place a file on the VS Code server; privileged victim runs the server
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.
This is a security flaw in Visual Studio Code, a code editor. An attacker who already has a normal account on a shared server could leave a harmful file there. When a more powerful user later starts the editor on that server, the harmful file runs with that user's higher permissions, letting the attacker act as that user.
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.