Skip to main content
Mallory
← Back to News
identity-authentication-vulnerabilityproof-of-concept-releaseendpoint-software-vulnerabilitycredential-access-method

VS Code Webview Flaw Enabled One-Click Theft of GitHub OAuth Tokens

Vulnerability Disclosure · 11 sources · Updated 5mo ago · First seen Jun 3, 2026

VS Code Webview Flaw Enabled One-Click Theft of GitHub OAuth Tokens

Security researcher Ammar Askar disclosed a zero-day in Visual Studio Code’s webview message-handling that allowed attackers to steal GitHub OAuth tokens from github.dev with a single malicious link. The attack abused forwarded keyboard events and simulated keypresses to cross the webview security boundary, silently install a malicious extension, and extract the token that GitHub passes to the browser-based editor. Multiple reports said the token was broadly scoped rather than limited to the repository being viewed, giving access to all repositories the victim could reach, including private repositories with read/write permissions.

The exploit chain was also reported to affect desktop VS Code in some scenarios involving attacker-controlled repositories and malicious workspace content, though Microsoft said the issue did not affect VS Code Desktop and later indicated the problem had been fixed in its services. Public reporting tied the disclosure to a dispute over Microsoft’s vulnerability-handling process, with Askar saying he notified GitHub shortly before release and published proof-of-concept code without coordinated disclosure. Recommended precautions included avoiding untrusted github.dev links, clearing saved site data for github.dev, and reviewing installed extensions for suspicious additions.

Do you run this?See affected versions and whether adversaries are exploiting it.
Check your exposure
Event timeline

How this story unfolded

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

5 events · Jun 2, 2026 – Jun 5, 2026
  1. Jun 5, 20266mo ago

    Microsoft says the issue was already fixed in its services

    A later report says Microsoft told BleepingComputer that the vulnerability had already been fixed in its services and that customers did not need to take action. This marks the first explicit claim in the references that remediation had already been completed.

    В VS Code нашли 0-day-уязвимость, позволявшую похищать токены GitHub - Хакер
  2. Jun 3, 20266mo ago

    Microsoft says it is working on a fix

    Following disclosure, Microsoft acknowledged the issue and said it was working on a fix. This acknowledgment was reported after GitHub had been notified and the exploit details were public.

    One-Click GitHub Dev Attack Lets Attackers Steal Full GitHub OAuth Tokens
  3. Jun 3, 20266mo ago

    Microsoft opens VS Code issue #319593 on webview keyboard shortcut abuse

    A GitHub issue was published in the microsoft/vscode repository documenting that webviews can trigger arbitrary keyboard shortcuts in the main workbench via forwarded keydown events. The issue describes the security implications of synthetic keyboard events crossing the webview boundary.

    Security: Webviews can trigger arbitrary keyboard shortcuts in the main workbench · Issue #319593 · microsoft/vscode
  4. Jun 2, 20266mo ago

    GitHub is notified about the vulnerability shortly before disclosure

    Reports say Askar notified GitHub about the issue roughly one hour before making the vulnerability public. One source explicitly anchors the notification to June 2, 2026.

    VS Code zero-day lets hackers steal GitHub tokens in one click
  5. Jun 2, 20266mo ago

    Ammar Askar publicly discloses VS Code/github.dev token-stealing zero-day

    Security researcher Ammar Askar publicly disclosed a one-click vulnerability affecting github.dev and VS Code webviews that can lead to GitHub OAuth token theft, and published technical details and proof-of-concept exploit code. Multiple reports state this 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.

Open in app →

Affected products

2 linked
GithubVisual Studio Code

Organizations

1 linked
GitHub
Do you run this?See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
Check Your Exposure
Mallory platform

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, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.