Back to Feed
VulnerabilitiesJun 4, 2026

VS Code Vulnerability Allows One-Click GitHub Token Theft

VS Code vulnerability allows one-click GitHub token theft via malicious Jupyter notebooks.

Summary

A researcher publicly disclosed a severe VS Code vulnerability that enables attackers to steal GitHub tokens through specially crafted Jupyter notebooks opened on github.dev. The attack exploits hidden code to simulate keystrokes that install a malicious extension, granting full repository access to victims. Microsoft patched the web version within 24 hours, but the desktop variant remains unpatched.

Full text

A security researcher has disclosed details of a severe Visual Studio Code (VS Code) vulnerability that can be exploited to steal a user’s GitHub token and access their repositories. The vulnerability in Microsoft’s popular code editor was discovered by Ammar Askar, who decided to make the technical details and a PoC exploit public without notifying the tech giant in advance. The researcher described a previous “horrible experience” when reporting a VS Code vulnerability, which Microsoft patched silently without giving him any credit. Askar made his new findings public on June 2, one hour after giving a heads-up to someone on the security team of GitHub, which Microsoft owns. While the vulnerability was disclosed as a zero-day, Microsoft rolled out a fix on June 3. Exploitation of this one-click security hole involves an attacker creating a specially crafted Jupyter notebook. When someone opens it on github.dev, a lightweight version of VS Code that runs entirely in the web browser, hidden code inside the notebook simulates keystrokes to install a malicious extension. Advertisement. Scroll to continue reading. This extension then quietly steals the victim’s GitHub access token and sends it to the attacker. The stolen token grants the attacker full read and write access to all repositories the victim can access, including private ones. The user clicking on a link pointing to the malicious notebook is the only requirement to trigger the attack. The victim is notified that the extension wants access, but only if github.dev was never used in the past. The attack also works against the desktop version of VS Code, but it is not as easy to carry out as it requires additional interaction from the victim. On the other hand, this attack can lead to remote code execution on the victim’s device. The desktop version appears to remain unpatched. SecurityWeek has contacted Microsoft for comment and will update this article if the company responds. This is not the first time a researcher has disclosed a Microsoft product vulnerability in recent weeks without notifying the vendor and giving it time to release a patch. A researcher known online as Chaotic Eclipse and Nightmare Eclipse made public PoC exploits for several zero-days following a disagreement with Microsoft during a vulnerability disclosure process. The list includes the vulnerabilities dubbed RedSun, UnDefend, BlueHammer, YellowKey, MiniPlasma, and GreenPlasma, some of which have been exploited in the wild. Microsoft responded with threats of legal action against researchers who dump zero-days, but later tried to calm concerns amid backlash from the cybersecurity community. Related: North Korean Hackers Target macOS Developers via Malicious VS Code Projects Related: From Trivy to Broad OSS Compromise: TeamPCP Hits Docker Hub, VS Code, PyPI Related: VS Code Configs Expose GitHub Codespaces to Attacks Written By Eduard Kovacs Eduard Kovacs (@EduardKovacs) is senior managing editor at SecurityWeek. He worked as a high school IT teacher before starting a career in journalism in 2011. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering. Daily Briefing Newsletter Subscribe to the SecurityWeek Email Briefing for the latest cybersecurity threats, trends, and expert insights. More from Eduard Kovacs Microsoft Tries to Calm Legal Threat Fears After Zero-Day Disclosure BacklashAndroid Update Patches Exploited Zero-Day, 123 Other VulnerabilitiesAnthropic Expanding Mythos Access to 150 New OrganizationsOracle WebLogic Vulnerability Exploited in the WildDashlane Brute-Force Attack Leads to Limited Encrypted Vault DownloadsVulnerability in Popular Conference Software Granted Attackers a 100% Talk Acceptance RateRomanian Hacker Sentenced to Prison in US for Selling Access to State NetworkLA Metro Cyberattack Linked to Iranian State-Sponsored Hackers Latest News Cisco Warns of Available PoC for Critical Unified CM VulnerabilityCoralogix Raises $200M at $1.6B Valuation to Scale AI Observability PlatformKirki, Burst Statistics WordPress Plugin Flaws in Attackers’ CrosshairsSecurity of 100 AI Agents Tested and Ranked – What You Need to KnowHackers Target Global Stock Exchange in Espionage OperationIMA Diligence Services Data Breach Impacts 525,000 PeopleOrganizations Warned of Exploited Linux Kernel Vulnerability‘HTTP/2 Bomb’ Exploit Knocks Web Servers Offline in Seconds Trending Daily Briefing NewsletterSubscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts. Webinar: Third-Party Risk in Practice June 4, 2026 Organizations are investing heavily in third-party risk management, but breaches, delays, and blind spots continue to persist. Join this live webinar as we examine the gap between how organizations think their third-party risk programs are performing and what’s actually happening in practice. Register Virtual Roundtable: CISO Forum 2026 Mid-Year Review June 10, 2026 Explore how attackers are using AI to scale threats and how security teams can respond with AI-driven defenses. Protecting against unmonitored use of generative AI (Shadow AI) in business units and building and enforcing AI governance frameworks. Register People on the MoveRapid7 announced that Wael Mohamed will assume the role of Chief Executive Officer, replacing current Chief Executive Officer Corey Thomas, who will become Executive Chairman of the Board.Anurag Jain has been appointed Senior Vice President of Engineering at CodeHunter.CTERA has appointed Tal Sarfaty as Senior Vice President of Cybersecurity.More People On The MoveExpert Insights The Zero-Knowledge Threat Actor and the End of Responsible Disclosure AI can help attackers generate malware, create malicious payloads, bypass simple security checks, and convert vague malicious intent into functional code. (Etay Maor) Raising the Cybersecurity Stakes: Ante up for the Agentic Era CISOs are now facing machine-speed attacks and asking, “How do I agent?” The industry must provide remediation at scale. (Nadir Izrael) Caught Off Guard: Securing AI After It Hits Production As enterprises rush AI projects into production, security teams are increasingly being forced into reactive mode. (Joshua Goldfarb) Cyber Resilience is the New Business Continuity Plan The organizations best prepared to face disruption are those that align security, continuity and risk management around what the business cannot afford to lose. (Steve Durbin) Enhancing Data Center Security Without Sacrificing Performance For AI data centers, where the stakes are the highest and performance constraints are the tightest, security and performance are no longer a zero-sum game. (Nadir Izrael) Flipboard Reddit Whatsapp Whatsapp Email

Indicators of Compromise

  • malware — malicious VS Code extension

Entities

Microsoft (vendor)GitHub (vendor)Visual Studio Code (product)github.dev (product)Ammar Askar (threat_actor)