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.
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
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
- Convince a target to clone a repository.
- Have the target open the repository in Visual Studio Code.
- 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.