The Trojan Horse in Your Editor: Check Your VS Code for these 11 Malicious Extensions NOW.

Malicious VS Code extensions — supply-chain risk
Malicious VS Code extensions can steal tokens, inject code, and exfiltrate source. Audit your editor now.

CyberDudeBivash ThreatWire — Global Cybersecurity News, CVE Reports & AI Security Updates

Daily, actionable briefs for security teams and builders across US/EU/UK/AU/IN.

Subscribe on LinkedIn

TL;DR: VS Code extensions run with your developer privileges. A single rogue add-on can steal PATs, SSH keys, npm tokens, AWS/GCP/Azure credentials, and silently alter builds. Below is a 10-minute audit to spot and remove risky extensions plus enterprise guardrails to stop it happening again.Quick Navigation

  1. Why extensions are a top-tier risk
  2. 11 red-flag signals of a malicious VS Code extension
  3. Do-this-now: 10-minute audit
  4. How to clean & harden VS Code
  5. Enterprise policy guardrails
  6. If you suspect compromise: IR playbook
  7. Next reads

Why VS Code extensions are a top-tier risk

VS Code extensions execute Node/TypeScript/JS with broad file and network access. Many request dangerous permissions (workspace.fsshelldebugwebview) and run background code on activation. Attackers abuse this to:

  • Harvest tokens (GitHub/GitLab PATs, npm/yarn, cloud CLI, SSH agents)
  • Backdoor source at commit time (pre-commit hooks, CodeAction rewrites)
  • Exfiltrate code via fetch() / WebSockets
  • Pivot into CI/CD via synced settings & extensions

The “11” red-flag signals of a malicious extension

Don’t chase names; chase behaviors. Flag any extension showing one or more of these signals:

  1. Unknown or newly created publisher with few installs/reviews, copycat name/icon.
  2. Recently renamed extension or sudden permission creep in package.json.
  3. Obfuscated/minified activation code fetched at runtime from a remote domain.
  4. Webviews that inject remote scripts or request cookie/storage access.
  5. Post-install scripts writing outside .vscode/extensions/ (eg. home dir, SSH keys).
  6. Network beacons to unfamiliar hosts or raw IPs over HTTP (not HTTPS).
  7. Shell execution (child_process.spawn) with git/ssh/npm commands.
  8. Telemetry exfil sending file paths, repo names, env vars, or tokens.
  9. Tampering with .git/hooks.npmrcrequirements.txt, or lockfiles.
  10. Demanding Workspace Trust for non-obvious reason.
  11. Removed from Marketplace or unpublished upstream but still installed locally.

Do-this-now: 10-minute audit

  1. List all extensions with versions
    code --list-extensions --show-versions
  2. Open the extension folder (inspect package.jsonout/*.js):
    Windows: %USERPROFILE%\.vscode\extensions
    macOS/Linux: ~/.vscode/extensions
  3. Search for suspicious code quickly:
    grep -R --line-number -E "fetch\\(|XMLHttpRequest|ws://|child_process|process\\.env|ssh|git\\s" .
  4. Review permissions in contributes & activationEvents. Anything needing broad FS or shell without a clear reason = uninstall/disable.
  5. Check Marketplace page (publisher age, change log, stars, sudden spikes, rename history).
  6. Disable Settings Sync for extensions if you don’t centrally vet them.
    VS Code → Settings → “Settings Sync”: turn off “Extensions”.
  7. Remove risky ones (safe, reversible):
    code --uninstall-extension <publisher.name>

How to clean & harden VS Code

  • Reset trust: Command Palette → “Workspace: Manage Workspace Trust”. Set unknown repos to “Restricted”.
  • Harden user settings (settings.json):{ “security.workspace.trust.enabled”: true, “extensions.autoCheckUpdates”: true, “extensions.autoUpdate”: true, “extensions.ignoreRecommendations”: true, “telemetry.telemetryLevel”: “off” }
  • Pin known-good extensions; avoid “kitchen-sink” packs.
  • Rotate tokens (GitHub/GitLab PATs, npm, cloud CLIs) if any extension looked shady.
  • Reinstall VS Code if persistence suspected; keep only essential, verified extensions.

Enterprise guardrails (DevSecOps)

  • Private extension gallery (curated allow-list) and block Marketplace access via proxy/DNS.
  • Signed builds only: enforce verified publishers and extension integrity hashes.
  • EDR rules: alert on VS Code spawning sshgitcurlnode with exfil patterns.
  • CI pre-commit/PR scanners to detect injected code patterns and lockfile drift.
  • Secrets scanners on dev endpoints and repos; auto-revoke leaked creds.

If you suspect compromise: mini IR playbook

  1. Isolate the endpoint from network; snapshot volatile data (open sockets, running Node processes).
  2. Hash & archive suspicious extension folders; review diffs to repos since last known good state.
  3. Rotate all developer tokens/keys; invalidate Settings Sync; re-provision workstation from gold image.
  4. Hunt for indicators in proxy/DNS (extension beacons) and in git logs (unexpected email/committers).

Editor’s Picks (Affiliate) — defender-friendly tools

Disclosure: We may earn a commission if you sign up via these links. We only recommend tools we’d use.

Next Reads


Why trust CyberDudeBivash? We track exploit kits, CVE weaponization, and developer-targeted supply-chain attacks across US/EU/UK/AU/IN and translate them into executive-ready actions.

Subscribe on LinkedIn

 #VSCodeSecurity #SupplyChainSecurity #DeveloperSecurity #IDEHardening #EndpointSecurity #DevSecOps #SourceCodeProtection #TokenTheft #RansomwareDefense #ZeroTrust #US #EU #UK #AU #IN

Leave a comment

Design a site like this with WordPress.com
Get started