One-Click GitHub Dev Attack Lets Attackers Steal Full GitHub OAuth Tokens
Vulnerability: Attackers can steal full GitHub OAuth tokens via malicious VS Code extensions in GitHub.dev with one-click exploits.
Deep Analysis and Expert Commentary
The attack chain begins when a victim clicks a malicious link, triggering JavaScript in an untrusted webview to simulate Ctrl+Shift+P and open VS Code's Command Palette. The exploit then installs a weaponized extension from the workspace's .vscode/extensions folder, bypassing publisher checks. Once installed, the extension harvests the broad-scope OAuth token passed to GitHub.dev, which unlike repo-specific tokens, grants full read/write access to all victim repositories. This flaw stems from GitHub.dev's overly permissive token delegation and VS Code's failure to enforce webview isolation. Mitigations include disabling automatic GitHub.dev token passing, auditing local workspace extensions, and restricting webview JavaScript execution until patches are released.
Action Items
- Disable automatic GitHub OAuth token delegation to GitHub.dev in account settings
- Audit .vscode/extensions folders for unauthorized local workspace extensions
- Implement network controls to block suspicious GitHub API requests from developer environments
Original Article Brief Intro
The Hacker News · 2026-06-03 · Vulnerability: Attackers can steal full GitHub OAuth tokens via malicious VS Code extensions in GitHub.dev with one-click exploits.
Related Terms and Notes
Context Notes
- GitHub
- GitHub.dev — GitHub's web-based VS Code editor that runs in browser sandboxes with OAuth token delegation.
- OAuth
- OAuth Token Compromise
- Repository Access
- Token Theft
- VS Code
- VS Code Exploit
- Webview — VS Code component that renders untrusted content like Markdown previews, vulnerable to message-passing exploits.
- Webview Exploit
- Webview Vulnerability