github.dev Token Theft Shows Browser IDE Risk
A June 2 disclosure showed how a crafted github.dev notebook could chain VS Code webview behavior and extension installation to expose a broad GitHub token. The fast fix still leaves a larger lesson about browser IDEs, extensions, and token scope.
Security researcher Ammar Askar published a June 2, 2026 disclosure describing a github.dev and Visual Studio Code attack path that could expose a GitHub OAuth token after a victim opened a crafted notebook in the browser-based editor. The proof of concept chained notebook webview behavior, synthetic key events, and extension installation behavior to install an attacker-controlled extension that read the token available to github.dev.
Microsoft's public VS Code pull request on June 3 added a trust confirmation before opening notebooks in serverless web sessions and hardened the installExtension command so arbitrary caller-provided context is no longer accepted. That is an important mitigation. The wider lesson is not limited to one fixed web editor bug: browser IDEs and desktop editors now sit close to source code, OAuth tokens, AI coding tools, package managers, and cloud credentials, so extension and token policy have become core supply-chain controls.
Key Takeaways
- check_circle Treat the June 2 disclosure as a developer-token exposure lesson, not only a single github.dev bug.
- check_circle The published VS Code fix addresses the browser notebook path, while desktop editor risk depends on user interaction and local extension exposure.
- check_circle Repository-wide or account-wide OAuth tokens create more damage than repo-scoped access when an editor trust boundary fails.
- check_circle Extension allowlists, publisher review, workspace trust, OAuth-app review, and audit-log monitoring are now baseline developer security controls.
- check_circle Teams should review recent github.dev use, extension installs, OAuth authorizations, and unusual repository API activity for high-trust accounts.
What Was Disclosed
Askar's disclosure described a practical attack against github.dev, the lightweight browser-based editor GitHub provides for opening repositories and pull requests. In the documented path, a victim who opened a crafted notebook in github.dev could have JavaScript running inside a notebook webview simulate editor key events, accept an extension recommendation, and trigger installation of a malicious extension. That extension then read the GitHub API token passed into the browser editor and used it to query repositories available to the victim.
The proof of concept matters because the action looks close to normal developer behavior. Opening github.dev links, previewing notebooks, installing editor extensions, and using GitHub-authenticated editor features are routine for many teams. The exploit did not require the victim to paste a token into a phishing page. It abused the way trusted editor actions could be reached from content that should have stayed less trusted.
Why Token Scope Matters
The most important claim in the disclosure is about token reach. Askar reported that the token available to github.dev was not limited to the single repository the victim had opened. If a token can read or write every repository the user can access, the blast radius follows the user's role rather than the file that triggered the attack. That is a serious difference for maintainers, release engineers, security staff, and employees with broad organization membership.
This is also why OAuth application review matters. GitHub's own documentation explains that OAuth apps can receive read or write access depending on the authorization. GitHub Apps are often preferred for automation because they can use fine-grained permissions and repository selection. For interactive web editors, the same principle applies: the less a token can touch by default, the less an editor bug can expose.
The Public Fix
A Microsoft VS Code pull request merged on June 3, 2026 shows the main service-side mitigation. The PR title says notebooks in serverless web sessions now require confirmation, and the installExtension command no longer accepts arbitrary caller-provided install context. In plain terms, the fix adds a human trust gate before the risky browser notebook path and narrows an extension-installation command surface that the exploit chain had used.
SecurityWeek reported on June 5 that Microsoft said the issue had been mitigated for its services and that no customer action was required. That statement should be read narrowly. It addresses Microsoft's hosted service posture after the fix. It does not mean every developer environment is immune to malicious notebooks, untrusted repositories, extension abuse, or overly broad GitHub tokens.
What Teams Should Check
Start with high-trust GitHub users: maintainers, organization owners, release engineers, CI administrators, and developers with access to private repositories or package publishing credentials. Review GitHub audit logs for unusual OAuth activity, repository enumeration, clone spikes, token use from unexpected IP ranges, new or unfamiliar extension-related activity, and write operations that do not match normal work. Treat suspicious activity as a token incident, not just a browsing event.
Then review OAuth and extension inventory. Ask users to remove stale GitHub OAuth app authorizations, clear github.dev site data if there is uncertainty about prior exposure, update VS Code and browser-based editor environments, and uninstall extensions that are unused, recently added under pressure, or published by unfamiliar accounts. Enterprise teams should move from informal guidance to explicit extension policy where possible.
Controls That Last
The durable control is least privilege at the developer-tool layer. Prefer fine-grained GitHub Apps where applications do not need broad OAuth access. Restrict OAuth app access in organizations. Require SSO enforcement and periodic authorization review. Use short-lived tokens where available, and separate high-risk roles so routine code browsing does not happen under accounts with release or organization-owner privileges.
For editors, use trusted publisher review, extension allowlists for managed fleets, workspace trust, and a clear rule that untrusted repositories and notebooks are opened in disposable environments. The goal is not to ban browser IDEs. The goal is to treat them like identity-bearing systems: useful, connected to sensitive data, and risky when content, extensions, and tokens share too much trust.
Checklist
- Update VS Code and verify the hosted github.dev mitigation is active for managed users.
- Review GitHub audit logs for unusual OAuth use, repository enumeration, clone spikes, and unexpected write activity.
- Remove stale authorized OAuth apps and reauthorize only applications that have a clear owner and purpose.
- Clear github.dev browser site data for users who opened unfamiliar github.dev or notebook links during the exposure window.
- Inventory VS Code extensions, remove unused extensions, and prefer publisher or extension allowlists for managed developer fleets.
- Move high-privilege GitHub work to accounts and workflows with narrower repository access and stronger review.
Sources
- Ammar Askar: 1-Click GitHub Token Stealing via a VSCode Bug open_in_new
- Ammar Askar proof-of-concept repository open_in_new
- Microsoft VS Code pull request 319705 open_in_new
- GitHub Docs: The github.dev web-based editor open_in_new
- GitHub Docs: Authorizing OAuth apps open_in_new
- Visual Studio Code docs: Webview API open_in_new
- Visual Studio Code docs: Extension runtime security open_in_new
Continue Reading
Opus 4.8 Helped Find Zcash's Orchard Forgery Bug
Taylor Hornby found a critical Zcash Orchard soundness bug using Opus 4.8 and custom tooling. The fix is live, but the incident turns supply proofs, shielded-pool accounting, and AI-assisted audits into practical security questions.
HTTP/2 Bomb Turns Header Limits Into Availability Risk
Calif's HTTP/2 Bomb research chained HPACK amplification with flow-control stalling to pressure major web servers. The practical response is to patch exposed terminators, cap decoded header work, and treat protocol defaults as availability risk.
Red Hat npm Compromise Exposes Provenance Gaps
Red Hat confirmed a supply-chain compromise in @redhat-cloud-services npm packages. The harder lesson is that signed provenance can still carry malicious code when the trusted workflow itself is abused.