Exploit database

Vulnerability

CVE-2022-41034

Visual Studio Code Remote Code Execution Vulnerability

Vulnerability details

Score
7.8
Severity
high

CVSS 3.1 · microsoft

Vector string

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C

Description

Visual Studio Code Remote Code Execution Vulnerability

CVE Program

Exploit source choices

1 source
VSCode ipynb Remote Development RCE
MSF-multi--misc--vscode_ipynb_remote_dev_execMetasploitLinux,Windows / remotePreferred

VSCode when opening an Jupyter notebook (.ipynb) file bypasses the trust model. On versions v1.4.0 - v1.71.1, its possible for the Jupyter notebook to embed HTML and javascript, which can then open new terminal windows within VSCode. Each of these new windows can then execute arbitrary code at startup. During testing, the first open of the Jupyter notebook resulted in pop-ups displaying errors of unable to find the payload exe file. The second attempt at opening the Jupyter notebook would result in successful exeuction. Successfully tested against VSCode 1.70.2 on Windows 10.

2022-11-22vscode_ipynb_remote_dev_exec.rb