Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

VS Code Vulnerability Allows One-Click GitHub Token Theft

A researcher has disclosed the full details of the vulnerability and released a PoC without notifying Microsoft in advance.

Security vulnerability

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.

UPDATE: Microsoft told SecurityWeek that the issue has been mitigated for its services and no customer action is required.

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 (@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.

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

SecurityWeek’s Cyber AI & Automation Summit pushes the boundaries of security discussions by exploring the implications and applications of predictive AI, machine learning, and automation in modern cybersecurity programs.

Register

Join to learn the four levels of architecting security into the agentic SDLC – from securing the code your developers' agents write to running a coordinated system of security agents you've built yourself.

Register

People on the Move

Mitek Systems has appointed Jordan Riek as CISO.

Jairo Orea has joined Ocean as CSO.

Johannes Ullrich is stepping down as the director of the Internet Storm Center.

More People On The Move

Expert Insights

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest cybersecurity news, threats, and expert insights. Unsubscribe at any time.