What’s Vulnerable › Vulnerabilities
CVE-2020-1171: Visual Studio Code Python Extension Remote Code Execution Vulnerability
- Severity: high (CVSS 8.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 5.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2020-05-21 · updated 2026-08-19
Description
A remote code execution vulnerability exists in Visual Studio Code when the Python extension loads configuration files 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 with the Python extension installed. Attacker-specified code would execute when the target opened the integrated terminal. The update address the vulnerability by modifying the way Visual Studio Code Python extension handles environment variables.
Affected products
- Microsoft Python extension for Visual Studio Code: before 2020.5.0 — fixed in 2020.5.0
- Microsoft Python extension for Visual Studio Code: from 2020 before publication — fixed in publication
How to fix
Upgrade to a fixed version: Microsoft Python extension for Visual Studio Code 2020.5.0; Microsoft Python extension for Visual Studio Code publication. Check the vendor advisory for mitigations.
References
- https://msrc.microsoft.com/update-guide/vulnerability/CVE-2020-1171
- https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1171
Get alerted when CVE-2020-1171 or the next vulnerability affects your stack