@rspack/core 1.1.7 and @rspack/cli 1.1.7 on npm held a hidden cryptocurrency miner, published with stolen npm tokens on 19 December 2024.
Several vant releases were hit the same day. The fixed releases are 1.1.8 for Rspack and 4.9.15 for vant.
What happened
Attackers used npm tokens that belonged to team members to publish poisoned versions.
- Heavily obfuscated code sat in a config file under
dist/utils/. - A postinstall script started the code.
- The code looked up the machine's location through ipinfo.io and sent data to 80.78.28.72.
- It downloaded and ran XMRig, a Monero miner, limited to 75 percent of the processor threads.
The Rspack team unpublished the bad versions as soon as it found them.
Affected versions
- @rspack/core 1.1.7 (about 394,000 weekly downloads).
- @rspack/cli 1.1.7 (about 145,000 weekly downloads).
- vant 2.13.3, 2.13.4, 2.13.5, 3.6.13, 3.6.14, 3.6.15, 4.9.11, 4.9.12, 4.9.13, 4.9.14 (about 46,000 weekly downloads).
- Safe: 1.1.6, or 1.1.8 and later for Rspack. 4.9.15 and later for vant.
Indicators of compromise
- Remote server:
80.78.28.72(Sonatype lists the path/tokens). - Location lookup to
ipinfo.io/jsonfrom a build or install step. - Monero wallet address
475NBZygwEajj4YP2Bdu7yg6XnaphiFjxTFPkvzg5xAjLGPSakE68nyGavn8r1BYqB44xTEyKQhueeqAyGy8RaYc73URL1jin the miner configuration. - A miner file named
/tmp/vant_helperin the vant variant. - An unexpected XMRig process that uses a high share of CPU.
- A postinstall script in the installed package that you did not see before.
Sonatype tracks the issue as sonatype-2024-013290.
How to check
Find every copy of the affected packages.
npm ls @rspack/core @rspack/cli vant
On Linux hosts and CI runners, look for the miner and the helper file.
ps aux | grep -i xmrig; ls -l /tmp/vant_helper
What to do now
- Upgrade @rspack/core and @rspack/cli to 1.1.8 or later and vant to 4.9.15 or later.
- Remove node_modules and reinstall from a clean lockfile.
- Stop any miner process on machines that installed a bad version.
- Rotate npm, GitHub and cloud tokens present on those machines. Block 80.78.28.72.
What Vigilance would show
These examples show an install hold and the corresponding owner report.
Example install message
Vigilance blocked `@rspack/core` 1.1.7. This version is too new or changed in a way Vigilance must check first.
Example owner report
Bad update
@rspack/core 1.1.7
A build tool's helper file can now find out where you are, then download and run a mining program.
No security team? See who reads the alert.
Frequently asked questions
Which Rspack versions were compromised?
@rspack/core 1.1.7 and @rspack/cli 1.1.7. Version 1.1.8 is the fix.
How did attackers publish the bad packages?
They used stolen npm tokens that belonged to team members.
Sources
Send this page to the person who looks after AI at your company.