On 8 September 2025, an attacker who had phished the npm account of Josh Junon (Qix), the maintainer of debug and many of chalk's building blocks, published malicious versions of 19 packages in eight minutes, between 13:12 and 13:20 UTC. Together they had more than 2 billion downloads a week. The added code ran in browsers, not at install: it hooked network calls and wallet APIs and rewrote cryptocurrency transactions to send funds to the attacker. npm removed the versions the same day. If any build installed one of them and bundled it into JavaScript served to browsers, rebuild and redeploy that bundle.
It is often lumped together with Shai-Hulud, which began a week later. The two are different attacks. This one was a single account takeover with a browser payload that didn't spread and didn't touch CI secrets; Shai-Hulud was a worm that ran at install, stole credentials from developer machines and CI, and used them to infect more packages. Both are software supply chain attacks on npm, and both start with a maintainer's stolen publishing rights.
What happened
| Time (UTC) | Event | Source |
|---|---|---|
| 5 September 2025 | The phishing domain npmjs.help is registered | Aikido |
| 8 September, before 13:12 | The maintainer receives a phishing email from [email protected] asking him to update his two-factor authentication | Tracking issue |
| 8 September, 13:12–13:20 | Malicious versions of 19 packages are published, starting with [email protected] and [email protected] | npm registry |
| 8 September, 13:16 | Aikido's feed flags the first packages | Aikido |
| 8 September, 13:35 | A user opens an issue on debug: "Version 4.4.2 published to npm is compromised" | Tracking issue |
| 8 September, 15:15 | The maintainer says he knows he was compromised and starts cleaning up | Aikido |
| 8 September | Clean releases of the chalk organization's packages, such as [email protected], are published over the malicious ones; npm removes all malicious versions over the course of the day | npm registry, GHSA-4x49-vf9v-38px |
| 9 September | DuckDB reports that malicious versions of its npm packages were published in the same wave | GHSA-w62p-hx95-gf2c |
| 13 September | The maintainer publishes clean patch versions of his packages, such as [email protected], to flush caches and mirrors | Tracking issue |
| 15 September | The maintainer publishes advisories with nine CVEs, CVE-2025-59140 to CVE-2025-59331 | Tracking issue |
| 15 September | Shai-Hulud, a separate attack, begins with @ctrl/tinycolor | Shai-Hulud |
The maintainer kept a timestamped log of the response in the debug tracking issue. He notes that GitHub "was not compromised" and that the repositories were untouched: the malicious code existed only in the versions published to npm.
Who is affected
Every project that installed one of the 19 versions while it was on the registry, which was a few hours on 8 September 2025. These packages sit deep in the dependency tree of almost every JavaScript project, so the question isn't whether you depend on them but whether a fresh install resolved to an affected version during that window. Most projects get them as transitive dependencies.
What the malware could do depends on where the code ran. GitHub's advisory for debug is precise: "Local environments, server environments, command line applications, etc. are not affected. If the package was used in a browser context (e.g. a direct <script> inclusion, or via a bundling tool such as Babel, Rollup, Vite, Next.js, etc.) there is a chance the malware still exists and such bundles will need to be rebuilt."
So for most teams the exposure is in their builds: a frontend build that bundled an affected version produced JavaScript that carried the payload to every user who loaded it, for as long as that bundle stayed deployed.
How it works
- Account takeover by phishing. The attacker sent the maintainer an email from
npmjs.help, a lookalike ofnpmjs.com, asking him to update his two-factor authentication, and the email led to the takeover of his npm account. No vulnerability in npm or GitHub was involved. - Code added to the published package only. Each malicious version was "functionally identical to the previous patch version, but with a malware payload added," in GitHub's words. There was no install script: the code sat in the package's own JavaScript and ran when that code was loaded.
- A browser-only payload. According to Aikido's analysis, the code ran in the browser, where it hooked
fetch,XMLHttpRequestand wallet interfaces such aswindow.ethereum, scanned responses and transactions for addresses on Ethereum, Bitcoin, Solana, Tron, Litecoin and Bitcoin Cash, and replaced them with attacker addresses chosen to look similar.
The CVE records and GitHub's advisories classify it as embedded malicious code (CWE-506). GitHub, as the CNA, scores the nine CVEs 8.8 under CVSS 4.0.
How to check whether you are affected
- Search every lockfile on every branch that ran CI on 8 September 2025 for the 19 versions. Put them in
affected.txt, onename@versionper line (the list is in the box above), and run:
git fetch --all --quiet
for ref in $(git for-each-ref --format='%(refname:short)' refs/remotes); do
while read -r pkg; do
name=${pkg%@*}; version=${pkg##*@}
git grep -n -A3 -F "\"$name\"" "$ref" -- '*package-lock.json' '*yarn.lock' '*pnpm-lock.yaml' \
| grep -F "$version" | sed "s|^|$pkg |"
done < affected.txt
done
- Check the builds of that day. Find every frontend build on 8 September 2025 that ran a fresh install (
npm install,npm update, a dependency update pull request or a build without a lockfile), and the bundles it produced. - Check what is deployed. A bundle built that day may still be served from a CDN, an app store build or a customer's installation. Check the build dates of the artifacts that are live, not only of the latest release.
- Check registry mirrors and caches. The maintainer warned that people were "still affected by malware due to private registry caches" days later. Search Artifactory, Nexus, Verdaccio or other proxies for the 19 versions.
npm audit reports the versions that have advisories. A clean npm audit today doesn't cover a bundle built on 8 September from a lockfile that has since changed. See are we affected? how to assess a new CVE across your builds and what npm audit does and doesn't check.
How to fix it, and what to do if you can't patch yet
- Move to any other version. The clean releases published over the malicious ones, such as
[email protected]and[email protected], are identical to the last good versions. Pin withoverrides(npm) orresolutions(Yarn) if a dependency still resolves to an affected version. - Clear caches and reinstall. GitHub's advisory says to "completely remove their
node_modulesdirectory, clean their package manager's global cache, and rebuild any browser bundles from scratch":
rm -rf node_modules
npm cache clean --force
gh cache delete --all --repo ORG/REPO # GitHub Actions caches, per repository
- Rebuild and redeploy every browser bundle built from an affected version, and invalidate CDN caches that serve it.
- Purge the versions from registry mirrors and dependency proxies.
Because the payload ran only in browsers, the advisories don't call for rotating CI secrets for this attack. That is the main difference in the response from Shai-Hulud, where any job that installed an infected version must be treated as compromised.
Verify the fix
- No lockfile on any branch resolves to one of the 19 versions.
- No deployed bundle was built from an affected version: compare each live bundle's build date and lockfile with the list.
- Mirrors and caches no longer serve the versions.
- The next build is clean. Check the versions it actually installed, from its log or per-build SBOM.
Check for compromise
The indicators for this attack are the package versions themselves; any of the 19 in a build that produced browser code means that code carried the payload. For users of an affected web application, the risk was a cryptocurrency transaction sent to an address that looked like the intended one. If your product handles cryptocurrency in the browser and served an affected bundle, review transactions made through it during the time it was live.
For maintainers and publishers, the indicator to watch is the phishing domain: emails from npmjs.help, or any domain other than npmjs.com, asking you to update two-factor authentication.
What to tell your customers
If you ship a web application or a product with a JavaScript frontend, customers will ask:
We checked every build of [product] from 8 September 2025 for the 19 npm package versions compromised that day, including debug 4.4.2 and chalk 5.6.1. [No build used an affected version.] / [A build of [component] on [date] included [package@version]; we rebuilt it on [date] and the affected bundle was live from [time] to [time].] The malicious code targeted cryptocurrency transactions in the browser and did not run on our servers or in our build systems.
For a first holding statement and templates for each outcome, see how to answer customers after a supply chain attack.
How CRACI helps
CRACI runs your GitHub Actions jobs on its own runners (runs-on: craci) and records every package each job actually fetches from npm, including transitive and hidden dependencies that lockfile-based tools miss. Build history keeps every past build with its SBOM, so you can see which builds contained an affected version and the period you were exposed, within your retention period (180 days by default). For this attack, that answers the question that matters: which frontend builds bundled an affected version.
Nine of the compromised versions have published CVEs, so CRACI flags them like any other vulnerability, and policy gates can block builds that contain them. chalk and the other chalk-organization packages have GitHub malware advisories without a CVE. CRACI doesn't detect malicious packages by behavior or reputation, and doesn't flag a new malicious version before an advisory exists.
CRACI's egress policy, which limits where a job can connect and fails closed, blocks exfiltration from a build to hosts it doesn't need. It doesn't help against this payload, which ran in your users' browsers, not in the build.
See the package record of one of your own builds
Related incidents: Shai-Hulud, the axios npm compromise. Other incidents: all vulnerabilities.
Sources and updates
Primary sources:
- The maintainer's tracking issue on
debug, with the timeline, the phishing email and the list of CVEs - GitHub Advisory Database: GHSA-4x49-vf9v-38px (debug, CVE-2025-59144), GHSA-2v46-p5h4-248w (chalk), GHSA-w62p-hx95-gf2c (DuckDB)
- CVE records: CVE-2025-59140, CVE-2025-59141, CVE-2025-59142, CVE-2025-59143, CVE-2025-59144, CVE-2025-59145, CVE-2025-59162, CVE-2025-59330, CVE-2025-59331
- npm registry: publish times of debug and chalk
- FIRST: EPSS scores
Research:
Updates:
- 2026-11-16: First published.