Visual Studio Code Remote Code Execution Vulnerability (CVE-2021-31211)
A remote code execution vulnerability exists in Visual Studio Code when a user opens a malicious file in a directory. An attacker could entice a user to open such a file, potentially leading to code execution.
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.
FAQ
How do I know if I am affected by this vulnerability? Customers running any Visual Studio Code Remote extensions (for example: Visual Studio Code Remote - SSH, Visual Studio Code Remote - Containers, or Visual Studio Code Remote - WSL extensions) are affected by this vulnerability. The fix for the vulnerability is in Visual Studio Code and not in the extensions. Customers running a Visual Studio Code Remote extension need to update Visual Studio Code to be protected from this vulnerability.
Visual Studio Code
Visual Studio Code
Microsoft
Microsoft
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
User opens a malicious file; Visual Studio Code Remote extension installed
The fix
The vulnerability was fixed in Visual Studio Code; users should update Visual Studio Code to be protected.
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. This bug meant that if you opened a specially crafted file from an untrusted source, an attacker could run their own code on your computer. You would have to be tricked into opening the file, so avoid opening files you don't trust.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.