Developers of the popular JavaScript bundler Rspack have revealed a significant supply chain attack targeting two of their npm packages, @rspack/core and @rspack/cli. Unauthorized actors published malicious versions of these libraries, embedding cryptocurrency mining malware. These packages, which collectively attract over 445,000 weekly downloads, are widely used by companies like Alibaba, Amazon, Discord, and Microsoft, amplifying the potential impact of the attack.
The malicious versions, identified as 1.1.7, included scripts designed to exfiltrate sensitive data such as cloud service credentials and user location details. Additionally, the malware limited its infection to systems outside specific regions, such as China, Russia, Hong Kong, Belarus, and Iran. Upon installation, a postinstall script triggered the download and execution of the XMRig miner on compromised Linux systems, harnessing the affected machines’ processing power for cryptocurrency mining.
In response, the Rspack team acted swiftly to mitigate the threat. They unpublished the rogue versions, released a secure update (1.1.8), and invalidated all npm and GitHub tokens associated with the project. Furthermore, the team audited their source code and permissions while investigating how the attacker gained access to publishing credentials. These measures aim to prevent future incidents and restore trust in the Rspack ecosystem.
This incident highlights the increasing risk of supply chain attacks in the open-source software community. Experts from security firm Socket suggest that measures like attestation checks could improve defenses, though such safeguards are not foolproof. The attack underscores the critical need for developers and package managers to adopt stringent security practices to protect against evolving threats in the software supply chain.
Reference: