npm debug / chalk Supply-Chain Attack: The Complete Guide

npm debug / chalk Supply-Chain Attack: The Complete Guide

Last updated: September 10, 2025 | 6 MIN

Ronen Slavin, Roni Kuznicki

Co-Founder & CTO, Security Developer

Key Highlights

What are the debug / chalk npm packages?

debug provides lightweight namespaced logging. chalk powers terminal string styling. They sit beneath a huge portion of the Node.js ecosystem, and their transitive deps (e.g., ansi-styles, supports-color, strip-ansi, wrap-ansi) are embedded widely — which is why poisoning these supply-chain nodes can ripple across countless apps.

What Happened?

On September 8, 2025, new versions of 18 high-traffic packages were pushed to npm with obfuscated code that, when executed in a browser context, monitors and tampers with crypto/web3 flows. The malware hooks into network and wallet APIs, rewriting recipients and approval targets to attacker addresses — all while keeping the UI looking legitimate.

The attack began with a successful phishing attack against a package maintainer via a fake npm support domain (npmjs.help).

Quick Timeline of the Compromise

  1. Sep 8, 2025 (morning US time): Maintainer targeted by support@npmjs.help phishing.

  2. Fake support domain npmjs.help registered.

  3. Sep 8, ~13:16 UTC: Malicious versions start appearing.

  4. Sep 8 (afternoon UTC): Maintainer acknowledges compromise on Bluesky; begins removal/cleanup.

  5. Later Sep 8: Researchers observe another maintainer/package targeted (proto-tinker-wc@0.1.87) using the same payload pattern.

What is the Impact?

How Do I Know If My Repositories Are Affected?

  1. Search your dependency graph (including lockfiles) for these exact malicious versions:

  2. Check recent builds: Identify web builds generated on/a few hours after Sep 8, 2025 13:16 UTC that could have pulled these versions. Rebuild after remediation.

  3. Audit CDN / artifact storage (e.g., S3, Cloudflare): purge affected JS bundles.

  4. Runtime telemetry: Look for anomalous wallet call patterns or outbound traffic consistent with rewritten destinations. (See IOCs.)

What Immediate Steps Should I Take to Mitigate the Risk?

Pin / revert dependencies

Rebuild & invalidate client caches

Incident response & monitoring

Rotate secrets where relevant

How Can I Prevent Similar Supply-Chain Attacks in the Future?

1. Strict version pinning + provenance

2. Malware & behavior screening in CI

3. Registry hygiene & publisher validation

4. Frontend release discipline

Indicators of Compromise (IOCs)

Phishing domain

Malicious package versions

TTPs Hooks fetch/XMLHttpRequest and wallet APIs (e.g., window.ethereum), monitors Ethereum, Bitcoin, Solana, Tron, Litecoin, and Bitcoin Cash addresses/flows, and rewrites recipients before signing.

How Cycode Helps Organizations Strengthen Their Software Supply Chain Security

1) Rapid blast-radius analysis with RIG

Cycode’s Risk Intelligence Graph pinpoints where malicious or vulnerable package versions enter your environment (direct or transitive), shows which pipelines built affected artifacts, can link those packages to code assets, and prioritizes remediation based on real execution during the exposure window.

2) Policy enforcement for package hygiene

Enforce allow-listed registries, block unverified publishers, and prevent builds when dependency drifts outside approved ranges.

3) Automated Threat Intel

Our feeds map known malicious versions (like the set in this incident) to your repos and pipelines, generating targeted alerts which include specific findings, and one-click fix guidance.

Conclusion

This campaign weaponizes a few foundational npm packages to push browser-side malware into web apps — a stark reminder that transitive dependencies can be the weakest link. By rapidly identifying malicious versions, rebuilding clean artifacts, and hardening dependency and release practices, you reduce both time-to-contain and end-user risk.