Skip to content
RCE Advisory Intermediate CVE-2021-31213

Visual Studio Code Remote Containers Extension Remote Code Execution Vulnerability (CVE-2021-31213)

A vulnerability in the Visual Studio Code Remote Containers extension allowed an attacker to execute arbitrary code by enticing a user to open a malicious file in a directory. The attacker could then run code with the privileges of the user.

Paul Hammond 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 Paul Hammond / http://paulhammond.org. 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

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 flaw in a tool that helps developers work inside containers. An attacker could trick someone into opening a harmful file, and that file could let the attacker run their own commands on the victim's computer. The user would need to open the file for the attack to work.

What is RCE?

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

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.