On September 8, 2025, an attacker phished a software maintainer through a fake website called npmjs.help and took over 18 of his code packages. Two of them, debug and chalk, are downloaded around 2 billion times a week. The replacement versions carried hidden code that tried to redirect cryptocurrency payments made by site visitors.
What is going on
npm is the public library where web developers get ready-made building blocks of code. Almost every modern website pulls in dozens of them without anyone thinking about it. It works like a parts supplier: you order the same component every time and trust the box that arrives.
In this case the attacker got the maintainer's login through a phishing page and published altered boxes under the trusted name. The added code hooked fetch and XMLHttpRequest, the two functions a browser uses to send and receive data. When a transaction went past, it quietly swapped the crypto wallet address for one belonging to the attacker.
Who is affected
Any website or web app that bundled one of the compromised package versions during the incident window is at risk. That includes sites that never use these packages directly, because they often arrive as a dependency of something else.
Known bad versions include chalk 5.6.1 and ansi-styles 6.2.2. Sites that handle cryptocurrency payments face the most direct harm, since that is what the code was built to steal.
What to do now
- Ask your developer or agency whether your site was built or rebuilt around September 8, 2025.
- Search your project's lock file for the affected versions, such as chalk 5.6.1 and ansi-styles 6.2.2.
- Clear the npm cache so a poisoned copy is not reused in the next build.
- Rebuild and redeploy your front-end bundles from clean packages.
- If your site accepts crypto payments, check recent transactions for addresses you do not recognise.
How to check your own site
A scanner cannot read the source code behind your build pipeline, so this specific swap has to be ruled out in your project files. What a scan can do is show the rest of your exposure: the free Website Security Check flags outdated CMS versions, known-vulnerable plugins, missing security headers, weak TLS and email-authentication gaps, which is a sensible follow-up once your bundles are clean.
Source: aikido.dev, September 2025.
Comments
No comments yet.