Code Injection in Visual Studio Code - CVE-2022-21991

 

Code Injection in Visual Studio Code - CVE-2022-21991

Published: February 8, 2022 / Updated: April 23, 2026


Vulnerability identifier: #VU60382
CSH Severity: High
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Amber
CVE-ID: CVE-2022-21991
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Microsoft
Affected software:
Visual Studio Code

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to improper input validation in Visual Studio Code Remote Development Extension. A remote attacker can send a specially crafted request and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


How to mitigate CVE-2022-21991

Install updates from vendor's website.

Sources