VSCode Webview Flaw Enables One-Click GitHub OAuth Token Theft
Security researcher Ammar Askar disclosed a vulnerability in Visual Studio Code's webview message handling that can let attackers steal GitHub OAuth tokens from github.dev with a single malicious link. The flaw abuses postMessage-based keyboard event forwarding to let untrusted webview content forge key events, cross the intended trust boundary, and trigger privileged actions inside the editor. Reports say the attack can silently install a malicious extension, extract authentication material from internal storage, and exfiltrate a GitHub token that may carry read/write access to private repositories.
The impact is especially severe on github.dev because GitHub reportedly supplies the browser editor with an OAuth token that is not scoped to just the repository being viewed, but to all repositories the user can access. The same underlying issue also affects desktop VSCode when a victim opens an attacker-controlled repository, where a malicious extension can go beyond token theft and achieve full remote code execution through Node.js APIs. Until Microsoft or GitHub ships a fix, defenders are being urged to avoid untrusted github.dev links and repositories, clear saved site data for github.dev, and review installed extensions for unauthorized additions.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
3 events from the most recent confirmed update back to the earliest known activity.
VS Code issue documents webviews triggering arbitrary keyboard shortcuts
A GitHub issue documented a security concern in Electron-based webviews where forwarded keydown events could let a malicious or XSS-compromised webview trigger dangerous application shortcuts. The report described potential abuse such as opening a terminal, shifting focus, and pasting commands into the active terminal.
Microsoft acknowledges GitHub.dev token theft bug and works on fix
After being notified on June 2, 2026, Microsoft acknowledged the GitHub.dev/VS Code webview vulnerability and said it is working on a fix. Microsoft also stated the issue does not affect VS Code Desktop.
Ammar Askar publicly discloses VSCode GitHub token theft bug
Security researcher Ammar Askar publicly disclosed a vulnerability affecting github.dev and VSCode webviews that can enable theft of GitHub OAuth tokens, and published a proof of concept. Reporting says the disclosure occurred on June 2, 2026.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
9 references tracked. Mallory keeps watching after this page renders.
One-Click GitHub Dev Attack Lets Attackers Steal Full GitHub OAuth Tokens
thehackernews.com
Open sourceGitHub Token Stealing Bug Exploits VSCode Webviews
securityonline.info
Open source1-Click GitHub Token Vulnerability Lets Attackers Steal Users' OAuth Tokens
cybersecuritynews.com
Open sourceHole in GitHub’s browser-based VSCode editor could lead to stolen token | InfoWorld
infoworld.com
Open sourceVS Code zero-day lets hackers steal GitHub tokens in one click
bleepingcomputer.com
Open sourceSecurity: Webviews can trigger arbitrary keyboard shortcuts in the main workbench · Issue #319593 · microsoft/vscode
github.com
Open sourceHole in GitHub’s browser-based VSCode editor could lead to stolen token | CSO Online
csoonline.com
Open source1-Click GitHub Token Stealing via a VSCode Bug : r/netsec
reddit.com
Open source1-Click GitHub Token Stealing via a VSCode Bug - Ammar's Blog
blog.ammaraskar.com
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


