Shai-Hulud 2.0:
A self-replicating npm worm called Shai-Hulud 2.0 used stolen GitHub tokens to create public repositories containing double base64-encoded secrets harvested from victims' machines. An attacker could read these exposed tokens and credentials to access source code and publishing keys, as happened when Trust Wallet's leaked secrets were used to push a malicious Chrome extension.
medium.com
Published on medium.com
If you’re in the security space, you already know what Shai-Hulud is. The original campaign hit the npm ecosystem back in September 2025 — a self-replicating worm that compromised hundreds of packages, harvested developer credentials, and exfiltrated them to attacker-controlled GitHub repositories.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a malicious npm package executed on developer machines, harvested credentials, and used stolen GitHub tokens to publish the exfiltrated secrets as public repositories.
Impact
Exposed GitHub and npm tokens and cloud credentials could be used to access source code and publishing keys; Trust Wallet's leaked secrets were reportedly used to publish a backdoored Chrome extension that drained about $8.5 million.
What the attacker needed
Malicious npm package installed; developer machine with secrets; stolen GitHub token with repo scope
The fix
The text says GitHub automatically removed the exfiltration repositories after a few days, but also notes that deleting repositories without rotating the exposed secrets leaves them valid.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A supply chain attack is when attackers compromise the tools or packages developers rely on, rather than attacking a company directly. Here, a malicious package spread through npm (a public repository of JavaScript code) and stole login tokens from developers' computers. Those tokens were then used to publish the stolen secrets openly on GitHub, where anyone could find and misuse them.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.