BTCC / BTCC Square / CryptoAdventure /
🚨 Malicious npm Package Caught Red-Handed Trying to Hijack Crypto Wallets – Swift Action Thwarts Catastrophe

🚨 Malicious npm Package Caught Red-Handed Trying to Hijack Crypto Wallets – Swift Action Thwarts Catastrophe

Published:
2025-09-10 12:29:02
17
1

Another day, another attempt to plunder digital assets—but this time, the white hats won.

Attackers slipped a weaponized package into npm's registry, disguised as harmless code. Its mission? Intercept wallet transactions and redirect funds to attacker-controlled addresses. The package exploited trust in open-source dependencies—a classic supply chain attack vector.

White-Hat Takedown

Security researchers spotted the malicious code within hours. npm's team nuked the package swiftly. No widespread theft occurred—this time. The incident highlights how fragile crypto infrastructure remains, even in 2025.

Stay sharp, folks. Update your dependencies. Verify hashes. And maybe don’t blindly `npm install` that sketchy-looking package promising "free gas optimizations."

Meanwhile, traditional finance still can’t even secure a PDF attachment—but sure, tell us more about how crypto is the risky one.

How it happened — the attack chain

Investigators attribute the compromise toagainst the maintainer. A fake support domain impersonating npm support prompted credential capture and session takeover. With valid publish rights, the attacker pushedthat looked legitimate at a glance but contained obfuscated payloads designed to activate(e.g., gated behind typeof window !== 'undefined'). Once downstream apps rebuilt, the tainted code could observe approvals andfor ETH, BTC, SOL and other chains.

Timeline

  • 13:16 UTC, Sep 8 — A wave of suspicious releases detected by security monitors; first public warnings go out with package names and hashes.
  • ~18:00–20:00 UTC — Maintainers and the npm registry begin deprecating/removing malicious versions; affected projects open advisories and lock dependency ranges.
  • 19:59 UTC — Final infected versions of key packages are taken down; maintainers republish clean builds and urge pinning.
  • Throughout the night — Hosting platforms (e.g., Vercel) purge build caches and trigger rebuilds so apps fetch clean artifacts; vendors publish IOCs and version lists for incident responders.

Affected packages (malicious versions)

Keep tables link‑free.

Package Malicious version
chalk 5.6.1
debug 4.4.2
ansi-styles 6.2.2
strip-ansi 7.1.1
ansi-regex 6.2.1
supports-color 10.2.1
wrap-ansi 9.0.1
slice-ansi 7.1.1
color 5.0.1
color-convert 3.1.1
color-string 2.1.1
color-name 2.0.1
is-arrayish 0.3.3
simple-swizzle 0.2.3
supports-hyperlinks 4.1.1
has-ansi 6.0.1
chalk-template 1.1.1
backslash 0.2.1

Why this matters for crypto

These utilities sitand are routinely bundled into. If the tainted releases had propagated for days, users could have seenacross major chains without any changes in the visible UI. Because the payload executed only in browser contexts, server‑side tests were unlikely to catch it; the risk window was tied toand.

Resolution — how the blast radius stayed small

  • Registry & maintainer actions: Tainted versions were deprecated/removed; maintainers republished clean builds and locked ranges. Project repos documented the incident (e.g., debug and chalk issues) and confirmed resolution.
  • Platform actions: Hosts like Vercel invalidated caches and forced clean rebuilds for affected projects, publishing guidance for customers.
  • Vendor actions: Security firms released complete package/version lists, detection rules, and IOCs so teams could audit lockfiles and pipelines quickly.
  • Community verification: Multiple teams confirmed minimal victim exposure thanks to the rapid takedowns and rebuilds.

What to do now (for teams and projects)

  • Audit lockfiles (package-lock.json/yarn.lock) for the versions above; repin to known‑good releases and reinstall from scratch.
  • Clear caches on CI, hosting, and CDNs; rebuild and redeploy clean artifacts.
  • Rotate tokens that touched compromised builds; enable 2FA and use scoped tokens on npm/GitHub.
  • Add publish policies (protected branches, required reviews, provenance/attestations) and train against phishing; never follow links in “urgent” security emails—navigate to npm manually.
  • The bigger picture

    One developer’s credentials became leverage against millions of apps. The lesson is simple:, reproducible builds with, andare mandatory controls when your packages ship everywhere. The ecosystem dodged a worst‑case, front‑end wallet drain because response was coordinated and fast.

    JD Staerk, Aikido Security, Semgrep, Vercel.Ledger CTO on X and the resolution note.

    Malicious npm Release Attempted to Hijack Wallets – Quick Response Averted Disaster

    |Square

    Get the BTCC app to start your crypto journey

    Get started today Scan to join our 100M+ users