Skip to main content
Mallory
Back to intelligence
identity-authentication-vulnerabilityendpoint-software-vulnerabilitycredential-access-methoddata-exfiltration-method

VSCode Webview Flaw Enables One-Click GitHub OAuth Token Theft

Updated 4h agoFirst seen Jun 3, 20269 sources

Security researcher Ammar Askar disclosed a vulnerability in Visual Studio Code's webview message handling that can let attackers steal GitHub OAuth tokens from github.dev with a single malicious link. The flaw abuses postMessage-based keyboard event forwarding to let untrusted webview content forge key events, cross the intended trust boundary, and trigger privileged actions inside the editor. Reports say the attack can silently install a malicious extension, extract authentication material from internal storage, and exfiltrate a GitHub token that may carry read/write access to private repositories.

The impact is especially severe on github.dev because GitHub reportedly supplies the browser editor with an OAuth token that is not scoped to just the repository being viewed, but to all repositories the user can access. The same underlying issue also affects desktop VSCode when a victim opens an attacker-controlled repository, where a malicious extension can go beyond token theft and achieve full remote code execution through Node.js APIs. Until Microsoft or GitHub ships a fix, defenders are being urged to avoid untrusted github.dev links and repositories, clear saved site data for github.dev, and review installed extensions for unauthorized additions.

Share:
VSCode Webview Flaw Enables One-Click GitHub OAuth Token Theft
Stay ahead

Get ahead of threats like this

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.

EVENT TIMELINE

How this story unfolded

3 events from the most recent confirmed update back to the earliest known activity.

3 EVENTS
Jun 3, 20261d ago

VS Code issue documents webviews triggering arbitrary keyboard shortcuts

A GitHub issue documented a security concern in Electron-based webviews where forwarded keydown events could let a malicious or XSS-compromised webview trigger dangerous application shortcuts. The report described potential abuse such as opening a terminal, shifting focus, and pasting commands into the active terminal.

Security: Webviews can trigger arbitrary keyboard shortcuts in the main workbench · Issue #319593 · microsoft/vscode
Jun 2, 20262d ago

Microsoft acknowledges GitHub.dev token theft bug and works on fix

After being notified on June 2, 2026, Microsoft acknowledged the GitHub.dev/VS Code webview vulnerability and said it is working on a fix. Microsoft also stated the issue does not affect VS Code Desktop.

One-Click GitHub Dev Attack Lets Attackers Steal Full GitHub OAuth Tokens

Ammar Askar publicly discloses VSCode GitHub token theft bug

Security researcher Ammar Askar publicly disclosed a vulnerability affecting github.dev and VSCode webviews that can enable theft of GitHub OAuth tokens, and published a proof of concept. Reporting says the disclosure occurred on June 2, 2026.

1-Click GitHub Token Stealing via a VSCode Bug - Ammar's Blog
LINKED ENTITIES

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

10 LINKEDOpen in app
The operational view lives in Mallory

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t — which of your assets are affected, which threat actors are using it right now, which detections to deploy, and what to do next.
Exposure mapping

Map indicators from this story to your assets and identify affected systems in minutes.

Threat actor evidence

Every observed campaign, victim, and pivot linked to actors named in this story.

Associated malware

Malware, exploits, and IOCs connected to the activity described here.

Detection signatures

YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.

Scheduled alerts

Get matching new stories delivered to your team as they break — not the next morning.

AI threads

Ask questions about this story and take action on the answers.

VSCode Webview Flaw Enables One-Click GitHub OAuth Token Theft | Mallory