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: 9.2 [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]
CVE-ID: CVE-2022-21991
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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.


Affected software

Visual Studio Code

How to mitigate CVE-2022-21991

Install updates from vendor's website.

Visual Studio Code - update to 1.64.1

External References

Related Security Bulletins