One-Click GitHub Dev Attack Lets Attackers Steal Full GitHub OAuth Tokens
Researchers say a single click in VS Code web flows can expose a GitHub OAuth token with broad repo access, including private repos.
Intelligence analysis by GPT-5.4 Mini

A researcher describes a one-click attack against GitHub.dev that abuses VS Code webviews and extension installation paths to steal OAuth tokens. Microsoft says it is working on a fix, and the issue does not affect VS Code Desktop.
A bad link can trick a web-based code editor into handing over a special login key. That key can be like a master badge that opens many private folders, not just the one being worked on.
Analysis
What happened
Security researcher Ammar Askar says an attacker can steal a GitHub token through GitHub.dev with just a click. GitHub.dev runs a lightweight VS Code editor in the browser, and the sign-in flow sends an OAuth token to let it act on the user's behalf.
How the attack works
The reported weakness comes from message passing between the main VS Code window and webviews, which are used for things like Markdown previews and notebook editing. By running malicious JavaScript inside an untrusted webview, the attacker can simulate keyboard input, open the Command Palette, and trigger installation of an attacker-controlled extension.
That extension can then extract the GitHub OAuth token passed to GitHub.dev and use the GitHub API to list private repositories the victim can access. The researcher also says VS Code's local workspace extensions feature can bypass the trusted publisher prompt when an extension is placed in a .vscode/extensions folder inside the workspace.
Scope and response
The article says the token is not limited to the repository currently being used. Instead, it can have access to every other repository the user can reach, which raises the stakes significantly for affected accounts. Microsoft has acknowledged the issue and said it is working on a fix. Microsoft also said the problem does not affect VS Code Desktop.
Key points
- Researchers say a one-click attack can steal a GitHub OAuth token through GitHub.dev in the browser.
- The token can have access to other repositories the victim can reach, including private ones.
- The attack uses untrusted VS Code webviews, simulated keypresses, and extension installation to run malicious code.
- Microsoft has acknowledged the issue and said it is working on a fix.
- The article says VS Code Desktop is not affected.
Microsoft has acknowledged the issue and said it is working on a fix, which means the vulnerable path may be closed. The article also says VS Code Desktop is not affected, limiting the problem to the web-based workflow described here.
Until the fix lands, a single click could still lead to token theft and exposure of private repositories. Because the token appears to cover more than one repo, a compromise could reach far beyond the project a developer intended to open.



