Dismantling a Critical Supply Chain Risk in VSCode Extension Marketplaces
Publishers of VSCode extensions leaked secrets, including access tokens that allow updating the extension, in publicly available extension packages. An attacker with these tokens could distribute malicious updates to the extensions' install base, potentially affecting over 150,000 installations.
Published on wiz.io
Wiz Research identified a pattern of secret leakage by publishers of VSCode IDE Extensions. This occurred across both the VSCode and Open VSX marketplaces, the latter of which is used by AI-powered VSCode forks like Cursor and Windsurf.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely publishers failed to remove hardcoded secrets and hidden files (like .env) from extension packages before publishing, making them publicly accessible.
Impact
An attacker could distribute malware to the cumulative 150,000 install base, but Microsoft revoked all leaked Visual Studio Marketplace PATs and implemented scanning to block extensions with secrets.
What the attacker needed
Leaked access token in public extension
The fix
Microsoft integrated secrets scanning to block extensions with verified secrets and revoked all leaked Visual Studio Marketplace PATs; OpenVSX added a prefix to tokens.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When developers publish extensions for code editors like VSCode, they sometimes accidentally include secret passwords or tokens in the files they upload. These tokens can let someone else take control of the extension and push malicious updates to everyone who has it installed. This report found many such leaked tokens and worked with the platform to fix the problem.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.