Visual Studio Code Remote Code Execution Vulnerability (CVE-2023-36742)
A vulnerability in Visual Studio Code allows code execution when a user opens a malicious folder that was shared with them. An attacker could get code to run on the victim's machine, though the attack is carried out locally and requires the user to open the crafted folder.
Originally disclosed on Microsoft
FAQ
According to the CVSS metric, the attack vector is local (AV:L). Why does the CVE title indicate that this is a remote code execution? The word Remote in the title refers to the location of the attacker. This type of exploit is sometimes referred to as Arbitrary Code Execution (ACE). The attack itself is carried out locally. This means an attacker or victim needs to execute code from the local machine to exploit 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 to open in VS Code a malicious folder that was shared with them.
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 VS Code did not properly restrict what a workspace folder could make it execute when the folder was opened.
Impact
An attacker could run code on the victim's machine, but only if the victim opens the malicious folder in VS Code.
What the attacker needed
Victim opens a malicious shared folder
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 program for writing code. This issue means that if someone sends you a folder and you open it in VS Code, hidden code inside it could run on your computer. You have to open the folder yourself, so the attacker cannot do it without your action.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.