In September 2025, the JavaScript ecosystem was hit with yet another reminder of how fragile our supply chain can be. A seemingly harmless npm package — error-ex — turned into a potential catastrophe overnight.
With 47 million weekly downloads, error-ex
isn’t a flashy framework like React or Express. It’s a tiny utility, buried deep inside dependency trees. Most developers never install it directly, but it silently powers countless applications, from startups to Fortune 500 companies.
For a brief moment, this package became a ticking time bomb.
It started with something that looked trivial:
That build error led investigators to version 1.3.3 of error-ex
. While the previous version (1.3.2) was a clean, single-line utility, the new release was bloated with heavily obfuscated code.
Hidden inside? A function called checkethereumw
— the first red flag that this wasn’t an innocent update.
The malware was a sophisticated crypto-clipper. Its goal: steal funds by manipulating wallet interactions.
Here’s how it worked:
checkethereumw
)window.ethereum
(MetaMask, Phantom, etc.).newdlocal
)fetch
and XMLHttpRequest
.runmask
)eth_sendTransaction
.0xFc4a...
).This wasn’t just a crypto attack.
Because error-ex
is so widely used, the malicious code could have:
The blast radius is almost impossible to measure.
Ironically, the attack was caught only because the build environment used an older Node.js version that didn’t support global fetch
. If not for that, it might have gone unnoticed much longer.
This incident underscores the need for better dependency hygiene. Here are three critical steps every team should adopt:
npm ci
in CI/CDnpm install
, npm ci
strictly installs exactly what’s in your package-lock.json
, preventing surprise updates.overrides
npm audit
often.
Open-source thrives on trust, but trust is not a security strategy.
A single compromised dependency can ripple across the entire software world.
The error-ex
incident should serve as a wake-up call:
Because in today’s ecosystem, even one line of malicious code can put millions at risk.
Stay safe out there.