Home โบ
Guides โบ VS Code Zero-Day: Beginner's Guide to GitHub Token Theft
Security Basics
{TITLE}
By Sarah Mitchell: 3 June 2026 ยท 6 min read
๐ What Happened: Plain English: On June 3, 2026, a security researcher showed how hackers can steal GitHub login tokens just by getting developers to click a link in their web browser. This isn't a virus or a password crack, it's a clever trick that takes advantage of how VS Code handles website connections. Even if you're not a developer, this matters because the tools your friends, family, and favorite apps rely on could be affected.
What Is a "Zero-Day" and Why Should I Care?
A zero-day is a security flaw that the software company doesn't know about and hasn't fixed yet. The name means developers have "zero days" to prepare a fix before attackers can exploit it.
Think of it like discovering a hidden door in your house that you didn't know existed, and someone else already knows where it is. Until you can lock that door (install a patch), your home is vulnerable.
In this case, the hidden door is in VS Code, a free code editor made by Microsoft that millions of developers use every day. The flaw lets attackers steal GitHub tokens, think of tokens as digital keys that let software programs access your online accounts automatically.
A Simple Guide to Tokens vs Passwords
If you've ever used a "Sign in with Google" button, you've used a token. Tokens are different from passwords in important ways:
| Feature | Password | Token |
| What it is | A secret word you type | A digital code your computer sends |
| Who uses it | You (a human) | Software programs |
| What happens if stolen | You can change your password | Harder to detect, programs don't "notice" they're stolen |
| Expires | Never (unless you change it) | Usually lasts hours or days |
| Access level | One account | Can have wide access to everything |
Key point: The GitHub tokens stolen in this zero-day attack have full access to all the code repositories the developer can access, not just the one they were editing. That's a much bigger problem than a stolen password, which would only let someone log into one account.
What Makes This Vulnerability Different?
Most security bugs we hear about involve hackers finding a weak password or tricking someone into downloading malware. This one is different:
- One click is all it takes. A developer only needs to click a malicious link. No download required.
- It exploits legitimate features. The attack abuses how github.dev handles its connection to GitHub, not a bug in the password system.
- The exploit code is public. Researcher Ammar Askar published working code on GitHub.
- No patch exists yet. Microsoft hasn't released a fix. Developers can only protect themselves by clearing their browser cookies.
How It Actually Works (Simple Explanation)
- You click a GitHub link. When a developer clicks a link to view code on github.dev, their browser sends an OAuth token to prove who they are.
- The token has superpowers. This token can access every repository the developer can access, including private ones.
- A hidden program hijacks the token. The exploit runs hidden JavaScript that simulates keypresses and installs a fake extension that silently sends the token to the attacker.
- The attacker has full access. Now the attacker can download all code, read secrets, and even push malicious code as if they were the legitimate developer.
Think of it like this: you hand your house key to a doorman at a building you're visiting. The doorman is supposed to only use the key for you. But instead, he makes a copy and gives it to a stranger who can now enter your house whenever they want, and you don't even know a copy exists.
Who Is at Risk?
This vulnerability affects anyone who uses github.dev, the browser-based version of VS Code. According to data from GitHub, that's potentially millions of developers worldwide. Even if you're not a developer, you should care because the Miasma supply chain attack disclosed this week (June 1, 2026) showed how attackers can use a single stolen developer credential to infect software packages used by millions. When you need a password immediately, the Instant Password Generator quick tool generates one with zero load time.
What You Can Do Right Now (Even as a Beginner)
- Clear browser cookies for github.dev. Open browser Settings โ Cookies and site data โ search for "github.dev" โ Clear data.
- Check your GitHub tokens. GitHub.com โ Settings โ Developer Settings โ Personal Access Tokens. Revoke any you don't recognize.
- Enable two-factor authentication (2FA). Use an authenticator app, not SMS.
- Use different passwords for every account. Start using a password generator to create strong, unique passwords.
- Stay informed. Follow security news and act quickly when urgent patches are announced.
- Use comprehensive security software. A solution like Kaspersky Premium provides real-time protection against credential theft, malware, and phishing attempts that often accompany zero-day exploits.
Frequently Asked Questions
What is VS Code and do I use it?
VS Code (Visual Studio Code) is a free code editor made by Microsoft. If you're not a developer, you probably don't use it, but the developers who build the apps you use every day definitely do.
Does this affect regular (non-developer) users?
Not directly. However, if a developer you work with is compromised, and they have access to code that powers an app you use, that app could be affected indirectly through a supply chain attack.
How is a token different from a password?
A password is something you type yourself. A token is a digital code that your computer sends automatically. The problem with stolen tokens is that you might not realize they've been taken.
Is Microsoft going to fix this?
Microsoft has not yet commented or released a patch. The researcher chose public disclosure citing a previous bad experience with Microsoft's security team. In the meantime, clear github.dev cookies as a temporary measure.
What's the single most important thing I can do?
If you're a developer: clear your github.dev cookies right now. If you're not: help the developers in your life understand this risk. Use strong, unique passwords everywhere and enable 2FA.
How to Check Whether Your Tokens Have Already Been Exposed
Before changing anything, it helps to understand your current situation. If you have used VS Code with any GitHub integration, there is a chance a token was stored on your machine at some point. Here is how to do a basic check:
- Open your system's credential manager or keychain application. On Windows this is called Credential Manager; on macOS it is Keychain Access. Search for entries that mention "github" or "vscode".
- Look at the creation and last-used dates for any token entries you find. A token that was created months ago and has never been rotated is a higher risk than one that was freshly issued.
- Log in to your GitHub account and go to Settings, then Developer Settings, then Personal Access Tokens. You will see every active token tied to your account along with the scopes (permissions) each one has. If you see a token you do not recognize, revoke it immediately.
- Check the "Recent activity" section of your GitHub Security log. This shows login events, token usage, and any actions performed through the API. Anything you do not remember doing is worth investigating.
If you find tokens you do not recognize or activity you cannot explain, revoke the suspicious tokens first, then change your GitHub password and enable two-factor authentication if it is not already on.
Common Mistakes People Make After Hearing About a Vulnerability
When news of a security flaw spreads, people often react in ways that either do too little or accidentally create new problems. Here are the most common missteps to avoid:
- Only updating and assuming that is enough. Updating VS Code is essential, but it does not automatically invalidate tokens that were already stored on your machine before the patch. You still need to rotate any tokens you had in use during the vulnerable period.
- Rotating tokens but keeping the same broad permissions. When you create a replacement token, take the opportunity to limit its scope. If a token only needs to read repositories, do not give it write access or access to your organization settings. Narrower permissions mean less damage if a future leak occurs.
- Ignoring tokens in scripts and configuration files. Many developers paste tokens directly into shell scripts, environment files, or build configuration files for convenience. These are easy to overlook when rotating credentials. Search your project directories for any file that contains a hardcoded token string.
- Assuming a private repository is automatically safe. A stolen token with read access to a private repository can still expose your code, issues, pull request comments, and any secrets accidentally committed to version history.
- Not checking other machines. If you use VS Code on more than one computer, such as a work laptop and a personal machine, the vulnerable version and its stored tokens may exist on any of them.
Verifying That Your Update Actually Took Effect
It is surprisingly common to think an application has been updated when it has not. Here is how to confirm VS Code is genuinely running the patched version and not a cached older copy:
- Open VS Code and go to Help, then About. The version number will be displayed clearly. Compare it against the official VS Code release notes to confirm you are on a version released after the vulnerability was disclosed.
- Fully close and relaunch VS Code after updating. Some updates do not fully apply until the application is restarted from scratch, not just reloaded.
- If you installed VS Code through a package manager or your operating system's software store, check that the update came through that same channel rather than a manual download from an unverified source.
Building a Habit Around Token Safety From here
The best response to any credential-related vulnerability is not just a one-time fix but a small set of ongoing habits that reduce your risk over time:
- Set expiration dates on tokens when the service allows it. A token that expires in thirty or ninety days limits how long a stolen credential remains useful.
- Review your active tokens every few months and revoke any you are no longer actively using. Dormant tokens are easy to forget about but remain valid until you remove them.
- Prefer authentication methods that do not require storing a long-lived token at all, such as short-lived OAuth flows, when your workflow supports it.
- Keep your editor and its extensions updated as a routine, not a reaction. Many vulnerabilities are patched quietly in minor updates before they become widely known.
Security does not require technical expertise to practice. Checking your tokens occasionally, limiting their permissions, and keeping software current covers most of the practical risk for everyday users.
Affiliate Disclosure: This post may contain affiliate links. If you purchase through these links, we earn a small commission at no extra cost to you. FreeStrongPassword.com is free to use. Full disclosure.