One-Click Attack Can Steal GitHub OAuth Tokens Through GitHub.dev and VS Code Webviews

· Original article ↗

Summary

A researcher disclosed a one-click attack that can expose GitHub OAuth tokens through GitHub[.]dev and VS Code webviews, potentially exposing private repositories. Microsoft acknowledged the issue and is working on a fix; VS Code Desktop is unaffected.

Key points

  • Clicking a crafted link can trigger malicious JavaScript in an untrusted webview to simulate keypresses and open VS Code’s Command Palette.
  • The attack can install an attacker-controlled extension that extracts the OAuth token passed to GitHub[.]dev.
  • The researcher says the token can access repositories beyond the one opened, including private repositories.
  • Local workspace extensions placed in the .vscode/extensions folder can bypass the publisher trust prompt.
  • Microsoft acknowledged the vulnerability and said it is working on a fix; the issue does not affect VS Code Desktop.

Article Details

Vulnerability Types
  • Message-passing vulnerability between the main VS Code window and webviews
Exploitation Status
unknown
Exploit Availability
unknown
Patch Status
unavailable

MITRE ATT&CK

People

Vendors

Products

Related Articles