If you’re a developer relying on npm packages like debug, chalk, or ansi-styles, your workflow and security posture could be exposed to risk. On September 8, 2025, a significant supply chain incident targeted a set of widely used npm packages, and it served as a strong reminder that trust in open-source dependencies is not a guarantee of safety.
It is worth checking whether any affected versions were pulled into your projects during the relevant window.
What Happened?
The attack began with a phishing campaign targeting a maintainer known as “qix.” Attackers impersonated npm support and tricked the maintainer into updating their authentication details. With that access, the attackers published malicious updates to a set of popular npm packages, including:
debug@4.4.2chalk@5.6.1ansi-styles@6.2.2supports-color@10.2.1- And 14 others
These malicious versions were live for just a short period, which was enough to create risk for anyone who pulled the affected release during that window.
How the Malware Worked
The injected code was a crypto-stealer, designed to interfere with cryptocurrency transactions in users’ browsers. Here’s how it operated:
- Browser Injection: The malware hooked into browser functions like
fetch,XMLHttpRequest, and wallet APIs (e.g.,window.ethereum, Solana APIs). - Transaction Monitoring: It scanned for cryptocurrency wallet addresses and transaction details across Ethereum, Bitcoin, Solana, and other blockchains.
- Address Swapping: When a transaction was detected, the malware replaced the destination address with one controlled by the attacker, often using “lookalike” addresses to avoid suspicion.
- Silent Execution: The malware operated stealthily, avoiding detection by security tools and ensuring transactions appeared legitimate to the user.
While the immediate goal was financial theft, the attack demonstrated a broader threat: any compromised library could be weaponised to manipulate data, exfiltrate sensitive information, or gain unauthorised access to systems.
Why Developers Should Care
Check Your Dependency History If you installed or updated any of the affected packages during the relevant release window, it is worth reviewing your lock files and dependency history. Even if you did not, transitive dependencies may still warrant a check.
Your Build Pipeline Deserves a Review Automated build systems and CI/CD pipelines that pulled these packages during the relevant window may warrant a quick audit before redeploying anything built from those snapshots.
Crypto Wallets Aren’t the Only Target While this incident focused on cryptocurrency, the same class of malicious dependency could be used to steal API keys, credentials, or sensitive data from applications and development environments.
Trust in Open Source Is Under Attack This incident proves that no package is too small or too trusted to be targeted. Attackers are exploiting the open-source supply chain because it’s efficient: compromise one maintainer, and you compromise thousands of downstream projects.
Common Myths About Supply Chain Attacks
"Only obscure packages get hacked." Wrong. This attack targeted some of the most popular npm packages, used by millions of developers daily.
"I’ll notice if something’s wrong." The malware was designed to be silent and stealthy. Many developers wouldn’t realise their transactions or data were being intercepted.
"My security tools will catch it." Traditional security tools often miss supply chain attacks because they rely on trusted sources. This malware evaded detection for hours.
How to Protect Yourself
-
Check for Compromised Packages
- Review your
package-lock.jsonoryarn.lockfor the affected versions. - Use tools like
npm auditor security platforms (e.g., Cortex Cloud) to scan for vulnerabilities.
- Review your
-
Pin Your Dependencies
- Always use exact versions in your
package.jsonto prevent unexpected updates. - Avoid
npm installwithout version constraints.
- Always use exact versions in your
-
Enable Integrity Checks
- Ensure your
package-lock.jsonuses strong hash algorithms (e.g., SHA-256) to verify package integrity. - Never install packages directly from Git without a commit hash.
- Ensure your
-
Monitor for Suspicious Activity
- Watch for unexpected network requests or changes in transaction behaviour.
- Use runtime security tools to detect anomalies in your applications.
-
Adopt a Prevention-First Approach
- Use Software Bill of Materials (SBOM) tools to track dependencies.
- Implement CI/CD security policies to block risky or unused packages.
The Bigger Picture: Supply Chain Security
This attack wasn’t just about stealing crypto. It was a proof of concept for how easily open-source ecosystems can be weaponised. By targeting a single maintainer, attackers compromised thousands of projects downstream, just like poisoning a water source to infect an entire city.
The lesson? Trust, but verify. Open source is powerful, but it’s only as secure as its weakest link.
What’s your biggest concern about supply chain attacks? Are you already using tools to protect your dependencies?