Paul Krill
Editor at Large

Researchers warn of malicious Visual Studio Code extensions

news
Jan 18, 20232 mins

Attackers could easily spoof popular Visual Studio Code extensions and trick developers into downloading them, Aqua Nautilus researchers report.

skull and crossbones pixels hacked
Credit: Getty Images

Can developers trust extensions downloaded for Microsoft’s popular Visual Studio Code editor? Researchers at Aqua Nautilus say they have found that attackers could easily impersonate popular extensions and trick unknowing developers into downloading them.

Some extensions may already have taken advantage of this, Aqua security researcher Ilay Goldman wrote in a January 6 blog post. It can be challenging to distinguish between malicious and benign extensions, and the lack of sandbox capabilities means that extensions could install ransomware, wipers, and other malicious code, Goldman wrote. A user’s code also could be accessed.

VS Code extensions, which provide capabilities ranging from Python language support to JSON file editing, can be downloaded from Microsoft’s Visual Studio Code Marketplace. Aqua Nautilus uploaded an extension masquerading as the Prettier code formatter and saw more than 1,000 installs in less than 48 hours, from around the world. The spoof extension has been removed.

Goldman noted that the Visual Studio Code Marketplace runs a virus scan for each new extension and subsequent updates, and removes malicious extensions when it finds them. Users can report suspicious-looking extensions via a Report Abuse link. Microsoft released a statement on the precautions it takes with the Marketplace:

To help keep customers safe and protected, we scan extensions for viruses and malware before they are uploaded to the Marketplace and we check that an extension has a Marketplace certificate and verifiable signature prior to being installed. To help make informed decisions, we recommend consumers review information, such as domain verification, ratings and feedback to prevent unwanted downloads.

Social engineering techniques have been used to persuade victims to download a malicious extension, Microsoft said. Visual Studio Code also has a Workspace Trust feature to help users decide whether code in a project or folder can be executed by the editor or by extensions without a user’s explicit approval. Folders can be left in Restricted Mode to prevent execution if code is not trusted.

Nevertheless, Goldman warned that the threat of malicious Visual Studio Code extensions is real. VS Code extensions also can be downloaded from NPM, which faces security threats as well, Goldman noted.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author