Full Report
Cybersecurity researchers have disclosed a one-click attack via Microsoft Visual Studio Code (VS Code) that makes it possible to steal a user's GitHub token. "Just by clicking a link, it's possible for an attacker to steal a GitHub token that can read and write to your repos, including private ones," security researcher Ammar Askar said. GitHub supports a feature called GitHub.dev that runs as
Analysis Summary
# Vulnerability: GitHub.dev Token Exfiltration via Malicious Webviews
## CVE Details
- **CVE ID**: Not yet assigned (Disclosed June 3, 2026)
- **CVSS Score**: Estimated 8.3-8.8 (High)
- **CWE**: CWE-94 (Improper Control of Generation of Code), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)
## Affected Systems
- **Products**: GitHub.dev (Web-based Visual Studio Code environment)
- **Versions**: All versions prior to the upcoming June 2026 fix
- **Configurations**: User must be logged into GitHub and interact with a malicious repository link. Note: **VS Code Desktop is not affected.**
## Vulnerability Description
The vulnerability stems from an insecure message-passing mechanism between VS Code **webviews** (used for Markdown or Jupyter Notebooks) and the main editor window. An attacker can execute malicious JavaScript within an untrusted webview to simulate "keydown" events (keypresses).
By automating these keypresses, the exploit triggers the Command Palette and installs a **local workspace extension** hidden within the `.vscode/extensions` folder of the repository. This bypasses the standard publisher trust dialog. Once installed, the extension intercepts the full GitHub OAuth token that `github.com` posts to `github.dev`, granting the attacker the same read/write permissions as the victim.
## Exploitation
- **Status**: PoC available (Disclosed by researcher Ammar Askar)
- **Complexity**: Low (One-click)
- **Attack Vector**: Network/Web
## Impact
- **Confidentiality**: High (Total access to all private and public repositories authorized by the OAuth token)
- **Integrity**: High (Ability to commit code and modify repositories)
- **Availability**: None (No direct denial of service reported)
## Remediation
### Patches
- **As of June 3, 2026**: Microsoft has acknowledged the issue and is currently working on a formal fix. Users should monitor official Microsoft Security Advisories for VS Code (Web).
### Workarounds
- **Exercise Caution**: Avoid clicking links that open unfamiliar repositories directly in `github.dev`.
- **Token Management**: Periodically review and revoke active GitHub OAuth sessions in your GitHub account settings if suspicious activity is suspected.
- **Environment Isolation**: Perform sensitive code reviews or edits in the VS Code Desktop application rather than the browser-based editor until a patch is deployed.
## Detection
- **Indicators of Compromise**: Existence of unexpected extensions in the `.vscode/extensions` directory of a repository.
- **Detection Methods**: Monitoring GitHub Audit Logs for unusual repository enumeration or unauthorized commits originating from a `github.dev` OAuth application.
## References
- [Ammar Askar's Technical Research Blog] - hxxps[://]blog[.]ammaraskar[.]com/github-token-stealing/
- [Microsoft VS Code GitHub Issue #319593] - hxxps[://]github[.]com/microsoft/vscode/issues/319593
- [The Hacker News Article] - hxxps[://]thehackernews[.]com/2026/06/one-click-github-dev-attack-lets[.]html