HomeSecurityHackers spread malicious extensions via VSCode marketplace

Hackers spread malicious extensions via VSCode marketplace

Careless developers publishing VSCode (Visual Studio) extensions to two marketplaces have included access tokens and other secrets that can be exploited by threat actors, according to a security vendor.

See also: WhiteCobra: Malicious extensions in the VSCode market

VSCode

The discovery was made earlier this year by researchers at Wiz, who quietly worked with Microsoft and VSCode Marketplace , as well as those behind the OpenVSX marketplace, to improve the guardrails on their platforms. It published a report on its research this week.

Wiz found over 550 validated secrets, spread across more than 500 extensions from hundreds of VS extension publishers. These included AI provider secrets for platforms like OpenAI, Gemini, Anthropic, xAI, DeepSeek, HuggingFace , and Perplexity; high-risk profession platform secrets for AWS, Github, Stripe, Auth0 , and Google Cloud Platform; and database secrets for MongoDB, Postgres , and Supabase.

Over 100 valid Azure DevOps Personal Access Tokens were found in VSCode Marketplace extensions. Together, they represented an install base of over 85,000 extension installations. Over thirty OVSX access token leaks were found, either in VSCode Marketplace or in OVSX extensions. Together, they represented over 100,000 extension installations.

The biggest contributor to the leak was developers' bundling of hidden files, also known as dotfiles, the report says. The abundance of .env was particularly prominent, although hardcoded credentials in the source code of extensions were also widespread.

See also: Malicious VSCode extensions infect Windows with cryptominer

Hackers spread malicious extensions via VSCode marketplace

During the Wiz investigation, researchers observed an increase in secret leaks via AI-related configuration files, including config.json, mcp.json , and .cursorrules. Other common sources included release configurations (for example, package.json) and documentation such as README.md.

Microsoft and Wiz have launched a notification campaign for affected publishers to help them address these vulnerabilities. Microsoft has also implemented secret scanning capabilities before publishing extensions to its marketplace and is now blocking extensions with verified secrets, notifying extension owners when secrets are detected. Details are in a June announcement.

Worse still, some threat actors realized there was an opportunity to exploit these marketplaces to poison the extension supply chain, just as they have in recent years attempted, in many cases successfully, to install malicious code on NPM, GitHub, and other open source repositories. The Wiz investigation was sparked by the discovery in February that threat actors had attempted to introduce malware into the VSCode marketplace in a classic supply chain attack that could have spread it widely.

An attacker who discovered this vulnerability in the platform's security could directly distribute malware to the total base of 150,000 installations, the Wiz report states.

See also: VSCode extensions downloaded ransomware at an early stage

Hackers spread malicious extensions via VSCode marketplace

The discovery is yet another example of why developers need to be more careful about sanitizing their code before putting it on open markets, and why CSOs need to ensure that the extensions used by their developers are closely monitored.

Selecting the team

🔒 Protect your privacy with Proton VPN

Swiss VPN from the creators of Proton Mail — strict no-logs policy, strong encryption, and built-in NetShield that blocks ads, trackers, & malware.

  • ✔ No-logs, based in Switzerland (except 14-Eyes)
  • ✔ NetShield: blocks ads, trackers & malicious domains
  • ✔ Covers all devices — free version available
Try Proton VPN for free — 30-day money-back guarantee →

The link is an affiliate link — SecNews may receive a commission at no additional cost to you. It does not affect the independence of our article writing.

📧
Subscribe to the SecNews Newsletter

The most important Security & Technology news in your Inbox.

Absentee Mia
Absentee Miahttps://www.secnews.gr/politiki-syntaxis/
Member of the Editorial Team of SecNews. He writes about cybersecurity, online fraud, privacy and technology. All articles follow the SecNews Editorial Policy.

SEARCH

FOLLOW US

📧
Newsletter SecNews
The most important Security & Technology news in your inbox.

LIVE NEWS