Security advisory
A remote code execution vulnerability exists in Visual Studio Code when a user is tricked into opening a malicious 'package.json' file. 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 opens the malicious 'package.json' file. The update address the vulnerability by modifying the way Visual Studio Code handles JSON files.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2020-16881
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 05:51 UTC · Revision 1
Source evidence
A remote code execution vulnerability exists in Visual Studio Code when a user is tricked into opening a malicious 'package.json' file. 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 opens the malicious 'package.json' file. The update address the vulnerability by modifying the way Visual Studio Code handles JSON files.
osv:CVE-2020-16881
Complete source record
{
"id": "d9987415ed0ea58e0aa2569fcd686c27aa6fce7bae190637aeac6831d5a33c66",
"url": "https://osv.dev/vulnerability/CVE-2020-16881",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2020-16881",
"summary": "A remote code execution vulnerability exists in Visual Studio Code when a user is tricked into opening a malicious 'package.json' file. 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 opens the malicious 'package.json' file. The update address the vulnerability by modifying the way Visual Studio Code handles JSON files.",
"evidence": "osv:CVE-2020-16881",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2020-16881",
"aliases": [
"CVE-2020-16881"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/microsoft/vscode",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "3dd905126b34dcd4de81fa624eb3a8cbe7485f13"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:microsoft:visual_studio_code:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.48.1"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"1.48.0",
"v14",
"1.16.0",
"translation/20170331.01",
"translation/20170324.01",
"translation/20170317.01",
"translation/20170311.01",
"translation/20170227.01",
"translation/20170217.01",
"translation/20161209.01",
"translation/20161014.01",
"translation/20160902.01",
"translation/20160826.01",
"translation/20160817.01",
"1.1.0-insider",
"0.10.12-insiders",
"0.10.10-insiders",
"0.10.7-insiders",
"0.10.5"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-16881.json"
}
}
],
"modified": "2026-10-24T10:30:33.444905890Z",
"provider": "osv",
"references": [
"https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-16881"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:a:microsoft:visual_studio_code:*:*:*:*:*:*:*:*"
],
"vendor_product": "microsoft:visual_studio_code",
"extracted_events": [
{
"range": [
{
"fixed": "1.48.1"
},
{
"fixed": "1.48.1"
}
],
"source": "CPE_RANGE"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2020-16881",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 433282,
"published_at": "2020-09-11T17:15:17.683+00:00"
}