Skip to content
RCE Advisory Intermediate CVE-2021-31214

Visual Studio Code Remote Code Execution Vulnerability (CVE-2021-31214)

A remote code execution vulnerability existed in Visual Studio Code that required a user to open a malicious file in a directory. An attacker could entice a user to open such a file, potentially leading to code execution.

ryotak Follow

Originally disclosed on Microsoft

High 7.8 View original

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 a directory. Users should never open anything that they do not know or trust to be safe.

Visual Studio Code

Visual Studio Code

Microsoft

Microsoft

The original report as published on the Microsoft Security Response Center, by RyotaK (https://twitter.com/ryotkak). Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

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 execute arbitrary code on the victim's machine if the user opens a malicious file, but user interaction is required.

What the attacker needed

Victim opens a malicious 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.

This is a security flaw in Visual Studio Code, a popular code editor. If a user opens a specially crafted file from an untrusted source, an attacker might be able to run harmful code on the user's computer. The user must be tricked into opening the file, so it is not automatic.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by ryotak

View all

1 more disclosed report, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.