ALT-10 · Analysis · 15 Oct 2026
Two billion downloads a week: the npm attacks of September 2025
One phishing email put a crypto-stealer into chalk and debug; days later a self-replicating worm spread through more than 500 packages. Why the theft came to about $20 — and how to pin a JavaScript supply chain.
Two attacks, one week apart
- 5 SepThe look-alike domain npmjs.help is registered.
- 8 Sep, 13:16 UTCMalicious versions of 18 packages appear, published from the hijacked account of their maintainer after an email asking him to update his two-factor settings.
- Same dayThe community flags the payload; most bad versions are pulled within hours.
- Following daysThe same actor uses a second hijacked account to compromise the duckdb packages.
- 14–15 SepShai-Hulud surfaces in @ctrl/tinycolor and starts copying itself into other packages.
- 22 SepGitHub announces changes to npm publishing: 2FA for local publishing, short-lived tokens, trusted publishing.
- 23 SepCISA warns that more than 500 packages are compromised and advises pinning to releases from before 16 September.
The crypto-clipper in chalk and debug
The code injected on 8 September ran in web browsers. It hooked fetch, XMLHttpRequest and wallet interfaces such as window.ethereum, watched for addresses on six blockchains, and replaced them with attacker addresses chosen to look similar — before the user signed.
| Item | Downloads per week |
|---|---|
| ansi-styles | 371M |
| debug | 358M |
| chalk | 300M |
| supports-color | 287M |
| strip-ansi | 261M |
| ansi-regex | 244M |
| wrap-ansi | 198M |
| color-convert | 194M |
Source: Aikido Security (8 Sep 2025). Eight of the 18 affected packages shown.
- Combined weekly downloads of the 18 packages
- 2B+Aikido Security
- Stolen in total — about $0.05 in ETH plus meme tokens
- ≈$20Security Alliance, via Protos
- Packages compromised by the Shai-Hulud worm
- 500+CISA (23 Sep 2025)
Shai-Hulud: the worm that published itself
The second attack aimed at developers rather than their users. Installing an infected version ran a hidden script that searched the machine for secrets — using the open-source scanner TruffleHog as well as environment variables and cloud metadata — and sent what it found to the attackers and to public GitHub repositories named “Shai-Hulud”. With a stolen npm token it then published infected versions of other packages that developer maintained. CISA reported GitHub tokens and AWS, Google Cloud and Azure keys among the targets.
Our reading
Analysis — Altumptic's interpretation of the reporting above.
- The fumble will not repeat. The September 8 payload ran in browsers, while most installs of these packages are build servers and command-line tools, and it was caught fast. The next attacker with the same reach will aim better.
- One-time codes are phishable. The maintainer had two-factor authentication. A code typed into a fake site works just as well for the attacker; hardware keys bound to the real domain do not.
- A token on a laptop is a publish button for everything. Shai-Hulud turned every infected developer into a distributor. Short-lived, scoped credentials and publishing from CI change that arithmetic.
- Clippers lose to independent verification. The clipper worked only if nobody compared the address with a second source — the same lesson as ALT-08, at retail scale.
Pinning a JavaScript supply chain
- Install from the lockfile only (
npm ci, or a frozen lockfile in other managers), never from floating version ranges in CI. - Do not adopt brand-new versions on day one; use a minimum release age where your package manager supports it.
- Turn off dependency install scripts by default and allow them per package.
- Publish through trusted publishing with provenance, and keep no long-lived npm or GitHub tokens on developer machines.
- Use phishing-resistant keys (FIDO2 / WebAuthn) for npm and GitHub, and never act on emails asking you to “update 2FA”.
- If you installed an affected version, rotate every credential that machine could read — not just npm.
Sources
- Aikido Security — npm debug and chalk packages compromised (8 Sep 2025)
- Semgrep — chalk, debug and color on npm compromised in new supply chain attack
- Protos — How crypto's ‘largest supply chain hack’ stole just $0.05
- Wiz — Shai-Hulud: ongoing package supply chain worm delivering data-stealing malware
- Sysdig — Shai-Hulud: the novel self-replicating worm infecting hundreds of npm packages
- GitHub — Our plan for a more secure npm supply chain (Sep 2025)
- CISA — Widespread supply chain compromise impacting npm ecosystem (23 Sep 2025)
Altumptic has no involvement in these incidents and no non-public information about them. Figures are as reported by the sources above on the dates given.
Cite this entry
Altumptic Lab (2026). ALT-10 — Two billion downloads a week: the npm attacks of September 2025. 15 Oct 2026. altumptic.com/research/npm-september-2025