Particle.news

VS Code Zero-Day Lets Attackers Steal Full GitHub OAuth Tokens

Malicious webview scripts can simulate keystrokes to install an extension that captures broad-scope tokens, prompting Microsoft to investigate and prepare a fix.

Overview

  • Researcher Ammar Askar published technical details and a public proof-of-concept on June 2 that shows a crafted github.dev link can open a Jupyter notebook which runs JavaScript in a webview to simulate keypresses and install a malicious extension.
  • The OAuth token that github.com POSTs to github.dev is not limited to a single repository and can grant read/write access to every repository the user can reach, including private repos.
  • Microsoft has acknowledged the flaw and said it is working on a fix, while reporting is mixed about whether web fixes were already rolled out and whether VS Code Desktop remains vulnerable.
  • Immediate steps recommended for developers include clearing github.dev cookies and site data, rotating exposed OAuth tokens, enforcing extension-install controls, and running secret scans across repositories.
  • The disclosure follows a May 20 incident where a malicious VS Code extension exposed thousands of internal repos and reflects growing distrust of Microsoft’s disclosure process after several researchers released public zero-days to pressure faster responses.