BotBeat
...
← Back

> ▌

MicrosoftMicrosoft
RESEARCHMicrosoft2026-06-02

Critical VSCode Vulnerability Enables One-Click GitHub Token Theft

Key Takeaways

  • ▸VSCode's webview iframe sandbox can be bypassed to steal GitHub OAuth tokens via a single malicious link
  • ▸The GitHub token passed to github.dev grants full-scope access to all user repositories, not scoped to the current repo
  • ▸The vulnerability exploits weaknesses in iframe isolation and postMessage cross-origin communication mechanisms
Source:
Hacker Newshttps://blog.ammaraskar.com/github-token-stealing/↗

Summary

A critical security vulnerability has been discovered in Microsoft's VSCode github.dev integration that allows attackers to steal GitHub OAuth tokens with a single click. The vulnerability exploits a flaw in VSCode's webview security model, which relies on iframe sandboxing and cross-origin communication via the postMessage API to isolate untrusted content. When users access GitHub repositories through github.dev—a lightweight browser-based VSCode instance—their full-scope GitHub token is transmitted to the web application, granting complete read and write access to all repositories they can access, not limited to the current repository.

Security researcher ammar2 has disclosed the vulnerability with a proof-of-concept demonstrating how attackers can craft malicious links that, when clicked, exfiltrate a user's GitHub token by exploiting gaps in VSCode's iframe-based sandbox isolation. The attack is particularly dangerous because the stolen token provides unrestricted access to private repositories and bypasses the intended security boundaries between VSCode's main window and webview frames. The vulnerability stems from weaknesses in how the postMessage API handles cross-origin communication when processing untrusted data.

Microsoft has not yet publicly announced a patch or mitigation strategy. The discovery highlights systemic risks in how OAuth tokens are transmitted in web-based development environments. Developers should exercise caution when clicking links referencing github.dev or VSCode webviews, and organizations may want to review GitHub OAuth token scoping policies and consider restricting github.dev access until a fix is released.

  • Until patched, developers should be cautious of suspicious github.dev links and organizations should review GitHub OAuth policies

Editorial Opinion

This vulnerability exposes a critical security flaw in OAuth token transmission: passing full-scope credentials to client-side web applications without proper, verifiable sandboxing creates unacceptable risk for millions of developers. Microsoft's decision to transmit an unrestricted GitHub token to github.dev, combined with VSCode's massive codebase and complex webview architecture, creates an attractive target. The company must urgently patch the iframe isolation and reconsider whether full-scope tokens should ever be used in browser-based development environments.

MLOps & InfrastructureCybersecurityPrivacy & Data

More from Microsoft

MicrosoftMicrosoft
UPDATE

Angry devs vow to flee GitHub Copilot as metered billing takes hold

2026-06-02
MicrosoftMicrosoft
UPDATE

Microsoft Dev Box Enters Maintenance Mode as Company Consolidates Around Windows 365

2026-06-01
MicrosoftMicrosoft
RESEARCH

Research Shows AI Coding Tools Boost Task Productivity by Up to 180%, But Fail to Translate Proportionally to Shipped Software

2026-06-01

Comments

Suggested

Google / AlphabetGoogle / Alphabet
PRODUCT LAUNCH

Google Launches Gemini Spark: An AI Agent That Knows Everything About You

2026-06-02
mAIb TechmAIb Tech
RESEARCH

mAIb Tech Introduces External Governance Layer Reference Architecture for AI Agent Systems

2026-06-02
AI Industry (Analysis & Commentary)AI Industry (Analysis & Commentary)
POLICY & REGULATION

Philadelphia Police Surveillance of AI Critics Conflates First Amendment Activity with Domestic Terrorism

2026-06-02
← Back to news
© 2026 BotBeat
AboutPrivacy PolicyTerms of ServiceContact Us