A significant Visual Studio Code security vulnerability allows attackers to gain persistent access to a developer’s workstation by clicking on malicious project folders within the source editor. This exploit circumvents the expected security measures of Workspace Trust, which is intended to safeguard users when opening code from an unknown source. When a folder is deemed untrusted, VS Code transitions into Restricted Mode, which is supposed to prevent actions like running tasks, debugging, or terminal commands.
However, Remedio researchers discovered a method that could allow a malicious project to trigger internal VS Code commands via a crafted command: link. Users often open these links with Ctrl+click, expecting them to open websites or documentation pages.
An attacker can mask a command link with innocuous text like "Install project dependencies" or "Set up this project." If the victim clicks the link in a source file, the editor could be tricked into installing a malicious VSIX package inside the project folder. This means a malicious extension can access local files, source code, SSH keys, cloud credentials, browser-accessible tokens, or development tools.
Crafted local VSIX extensions can claim support for untrusted workspaces, potentially allowing an attacker to install malicious extensions without a security warning. Developers should avoid clicking links in unfamiliar repositories, especially those claiming to install dependencies, configure environments, or launch project setup actions.











