Skip to content
RCE Advisory Intermediate CVE-2020-1481

Visual Studio Code ESLint Extension Remote Code Execution Vulnerability (CVE-2020-1481)

The ESLint extension for Visual Studio Code mishandled environment variables when validating source code after a project was opened, allowing attacker-specified code to run. An attacker could convince a target to clone a repository and open it in the editor, leading to arbitrary code execution in the context of the current user.

David Dworken Follow

Originally disclosed on Microsoft

Description

A remote code execution vulnerability exists in the ESLint extension for Visual Studio Code when it validates source code after opening a project. An attacker who successfully exploited the vulnerability could run arbitrary code in the context of the current user. If the current user is logged on with administrative user rights, an attacker could take control of the affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. To exploit this vulnerability, an attacker would need to convince a target to clone a repository and open it in Visual Studio Code. Attacker-specified code would execute when the target opened source code in the editor. The update addresses the vulnerability by modifying the way ESLint extension for Visual Studio Code handles environment variables.

Visual Studio

Visual Studio

Microsoft

Microsoft

The original report as published on the Microsoft Security Response Center, by David Dworken. 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

Root cause

Likely the ESLint extension did not safely handle environment variables when validating source code, allowing attacker-controlled values to influence execution.

Impact

An attacker could run arbitrary code as the current user, and if that user has administrative rights, could take control of the system, install programs, view, change, or delete data, or create new accounts with full user rights.

What the attacker needed

Victim clones a malicious repository; victim opens it in Visual Studio Code

How it was found

  1. Convince a target to clone a repository.
  2. Have the target open the repository in Visual Studio Code.
  3. Attacker-specified code executes when the target opens source code in the editor.

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 code editor add-on that checks your code for mistakes. If you opened a malicious project, the add-on could be tricked into running the attacker's code on your computer, with the same permissions you have.

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 David Dworken

View all

15 more disclosed reports, 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.