VS Code Exploit Can Steal GitHub Tokens via github.dev


TL;DR

  • Exploit Release: Security researcher Ammar Askar has released code for a VS Code flaw that can steal GitHub tokens.
  • Token Scope: The reported attack can reach private repositories because github.dev receives a broad OAuth token.
  • Mitigation Path: Users can reduce risk by clearing github.dev site data and treating unexpected repository links as credential-risk events.
  • Patch Status: The flaw had no CVE ID or completed patch at publication time.

Security researcher Ammar Askar released exploit code on June 2 for a Visual Studio Code flaw that can steal GitHub tokens after a victim clicks one github.dev repository link.

For developers, the practical risk is the token’s reach. GitHub’s browser editor receives an OAuth token that lets the session act for the signed-in user, and the disclosed chain can reach repositories beyond the one that opened the editor.

How the github.dev Attack Chain Works

Askar’s disclosure describes a chain that can steal GitHub authentication tokens. One stolen token can reach every repository the user can access, including private repositories.

GitHub’s github.dev browser editor lets signed-in users browse repositories, edit files, commit changes, and open a repository by changing github.com to github.dev. GitHub.com then sends an OAuth token to github.dev so the editor can interact with GitHub for the user.

An OAuth token works like a delegated credential: software can use it to act on the user’s behalf without asking for the password again. Here, the danger comes from a token broad enough to reach repositories beyond the one that launched the editor.