Visual Studio Code Remote Code Execution Vulnerability (CVE-2026-70094)
Visual Studio Code has an untrusted search path flaw that lets an attacker execute code over the network. The attacker must get a user to open a specially crafted file to trigger the remote code execution.
Davi Matsuyama Follow with luff_y84, MapleAutumn and 1 other
Originally disclosed on Microsoft
Description
Untrusted search path in Visual Studio Code allows an unauthorized attacker to execute code over a network.
FAQ
According to the CVSS metric, the attack vector is network (AV:N) and user interaction is required (UI:R). What is the target context of the remote code execution? This attack requires a user to open a specially crafted file from the attacker to initiate remote code execution.
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 application searches for a required library or executable in a location that an attacker can influence, rather than a trusted, fixed path.
Impact
An attacker could execute code on the victim's machine, but only if the victim opens a specially crafted file.
What the attacker needed
Victim opens a specially crafted file
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. An 'untrusted search path' means the program looks for files it needs in a folder an attacker can control, so it can be tricked into running the attacker's code. The attacker has to convince someone to open a file they sent, and then code can run on that person's computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.