npm

The chalk and debug npm Supply Chain Attack

Updated 5 Oct 2026 · Incident date 8 Sept 2025

Attackers published bad versions of 18 npm packages, including chalk 5.6.1 and debug 4.4.2, that redirect cryptocurrency payments in the browser on 8 September 2025.

A phishing email took over the maintainer's npm account. The packages together have more than 2 billion downloads each week.

What happened

A phishing email gave the attacker control of a maintainer's npm account.

  • The email looked like a 2FA reset notice from support@npmjs.help. The domain was registered on 5 September 2025.
  • The attacker published poisoned releases of 18 packages. They wrap fetch, XMLHttpRequest and window.ethereum.request.
  • The code scans traffic for wallet addresses on several blockchains.
  • It replaces each address with a look-alike address that the attacker controls.
  • It rewrites token approvals and swap recipients on common exchanges.

Wiz puts the window at about 13:16 to 15:15 UTC on 8 September 2025. A second maintainer was phished later that day, which led to a bad proto-tinker-wc release.

Affected versions

  • ansi-regex@6.2.1.
  • ansi-styles@6.2.2.
  • backslash@0.2.1.
  • chalk@5.6.1.
  • chalk-template@1.1.1.
  • color-convert@3.1.1.
  • color-name@2.0.1.
  • color-string@2.1.1.
  • debug@4.4.2.
  • error-ex@1.3.3.
  • has-ansi@6.0.1.
  • is-arrayish@0.3.3.
  • simple-swizzle@0.2.3.
  • slice-ansi@7.1.1.
  • strip-ansi@7.1.1.
  • supports-color@10.2.1.
  • supports-hyperlinks@4.1.1.
  • wrap-ansi@9.0.1.
  • Wiz also lists bad versions of duckdb, @duckdb/node-api, @duckdb/node-bindings, @duckdb/duckdb-wasm, proto-tinker-wc and @coveops/abi.
  • Last clean releases: chalk 5.6.0, debug 4.4.1 and ansi-styles 6.2.1.

Indicators of compromise

  • Phishing domain: npmjs.help, sender support@npmjs.help.
  • Obfuscated code in bundled JavaScript that starts with const _0x112fa8=_0x180f;.
  • Code in a package entry file that wraps fetch, XMLHttpRequest or window.ethereum.request.
  • For proto-tinker-wc, the changed file is dist/cjs/proto-tinker.cjs.entry.js.
  • Socket publishes a list of attacker wallet addresses on Ethereum, Bitcoin, Tron, Litecoin, Bitcoin Cash and Solana.

How to check

List every installed copy of these versions, including indirect dependencies, and search your lockfile. Check each frontend that built on 8 September 2025.

npm ls --all 2>/dev/null | grep -E '(ansi-regex@6\.2\.1|ansi-styles@6\.2\.2|backslash@0\.2\.1|chalk@5\.6\.1|chalk-template@1\.1\.1|color-convert@3\.1\.1|color-name@2\.0\.1|color-string@2\.1\.1|debug@4\.4\.2|error-ex@1\.3\.3|has-ansi@6\.0\.1|is-arrayish@0\.3\.3|simple-swizzle@0\.2\.3|slice-ansi@7\.1\.1|strip-ansi@7\.1\.1|supports-color@10\.2\.1|supports-hyperlinks@4\.1\.1|wrap-ansi@9\.0\.1)'
grep -nE '(ansi-regex@6\.2\.1|ansi-styles@6\.2\.2|backslash@0\.2\.1|chalk@5\.6\.1|chalk-template@1\.1\.1|color-convert@3\.1\.1|color-name@2\.0\.1|color-string@2\.1\.1|debug@4\.4\.2|error-ex@1\.3\.3|has-ansi@6\.0\.1|is-arrayish@0\.3\.3|simple-swizzle@0\.2\.3|slice-ansi@7\.1\.1|strip-ansi@7\.1\.1|supports-color@10\.2\.1|supports-hyperlinks@4\.1\.1|wrap-ansi@9\.0\.1)' package-lock.json

What to do now

  1. Pin each package to a clean version in your lockfile and block the bad versions in a private registry.
  2. Clear package caches with npm cache clean --force. Remove node_modules and reinstall from the pinned lockfile.
  3. Rebuild and redeploy every frontend that built in the window. Invalidate old files on your CDN.
  4. Look at signing and approval activity in the window for recipient or spender addresses that you do not know.

What Vigilance would show

These examples show an install hold and the corresponding owner report.

Example install message

Vigilance blocked `chalk` 5.6.1. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

chalk 5.6.1

A text-coloring helper can suddenly watch a web page's payment traffic and swap the destination of outgoing cryptocurrency payments.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

How bad was the damage?

Wiz says reported financial loss was minimal. The code reached about 10 percent of the cloud environments it monitors.

Does the code stay on the machine?

Wiz says the malware has no persistence and no telemetry. Its impact ends when the script stops running.

Where does the code run?

In a browser. It matters most when a web application bundled a bad version into its frontend code.

Sources

  1. socket.dev/blog/npm-author-qix-compromised-in-major-supply-chain-attack
  2. wiz.io/blog/widespread-npm-supply-chain-attack-breaking-down-impact-scope-across-debug-chalk
  3. aikido.dev/blog/npm-debug-and-chalk-packages-compromised

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 attacks in the library · npm supply chain attacks · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library