Rapid7 Vulnerability & Exploit Database

VSCode ipynb Remote Development RCE

Back to Search

VSCode ipynb Remote Development RCE



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.


  • h00die
  • Zemnmez




Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/misc/vscode_ipynb_remote_dev_exec
msf exploit(vscode_ipynb_remote_dev_exec) > show targets
msf exploit(vscode_ipynb_remote_dev_exec) > set TARGET < target-id >
msf exploit(vscode_ipynb_remote_dev_exec) > show options
    ...show and set options...
msf exploit(vscode_ipynb_remote_dev_exec) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security