Technology

Global alert: malware found hidden in an NPM library with billions of downloads

By Igor Domsac · Originally published in Spanish on September 10, 2025 · Read the original

Malware alert: cryptocurrencies, BTC and XMR

A new software supply chain attack has shaken the technology ecosystem and, by extension, the world of cryptocurrencies. Security researchers have detected malicious code hidden in a popular library on NPM, the Node.js package manager. This software is embedded in thousands of applications and tools used by millions of people, including some related to wallets, exchanges, and trading platforms.

The finding, published by researcher JD Staerk, has caused great alarm because the attack steals sensitive information, in particular the private keys of Bitcoin and other cryptocurrency wallets, and also uses infected machines to mine Monero (XMR) in the background. This makes the threat one of the most serious in recent years, capable of emptying cryptocurrency accounts without the user noticing until it is too late.

From legitimate library to silent malware

The affected package began as a legitimate tool for handling XML-RPC, a veteran but still widespread technology for communication between servers and web applications. Its popularity and the trust placed in it led thousands of projects to include it as a dependency. The problem began when, in a recent update, the attackers introduced carefully obfuscated malicious code. For weeks it went unnoticed, running only under certain conditions, which made it hard to detect.

The malware has two main functions:

  1. Covert cryptocurrency mining. It consumes the infected computer’s resources to mine Monero. It activates only when it detects that the user is idle, thus avoiding giving itself away through abnormal spikes in power consumption or CPU load.
  2. Theft of data critical to cryptocurrencies. It scans the system for:
    • Private wallet keys.
    • .ssh files and server credentials.
    • API tokens for exchanges and trading platforms.
    • Command history, which may contain sensitive information.

The code sends all this information to the attackers through legitimate services such as Dropbox, camouflaging the malicious traffic among normal communications. This means a user could lose total control of their funds without suspecting it. Once the cryptocurrencies have been transferred to another address, the operation is irreversible.

Precedents that show the real risk

This attack is not an isolated case. The crypto ecosystem has suffered massive thefts originating in similar vulnerabilities:

Copay (2018)

BitPay, the developers of the popular Copay wallet, suffered an attack that was essentially identical:

  • An NPM package called event-stream was modified to include malware.
  • The malicious code activated only in the production version of Copay, stealing users’ private keys.
  • Estimated losses: hundreds of thousands of dollars in BTC and other cryptocurrencies.
  • This incident was one of the first to demonstrate how a single dependency can compromise an entire system.

Ledger Live (2020)

Ledger, a manufacturer of hardware wallets, suffered an attack on its update system:

  • Cybercriminals gained access to servers and distributed modified software.
  • Although they did not manage to access the devices directly, they obtained millions of customers’ personal data, later used in phishing attacks.
  • The result was a wave of fraud and losses for users who fell for carefully designed scams.
  • This case showed that even leading companies are not exempt from vulnerabilities in their supply chain.

The current case: the invisible threat

The attack discovered now combines the worst of both cases:

  • Silent mining, generating income for the attackers at the expense of the victims’ resources.
  • Direct theft of private keys, with the capacity to empty accounts instantly.
  • Use of legitimate services to exfiltrate data, which makes it harder for security systems to detect the suspicious activity.
  • With billions of downloads, the potential reach is devastating.

Lessons for the crypto community

The decentralization that makes the world of Bitcoin and other cryptocurrencies attractive is also its greatest weakness in terms of security. Without a central authority that can reverse transactions, protection depends entirely on each user and developer.

In cybersecurity applied to the crypto ecosystem, specialists insist on the need to adopt preventive measures at both the individual and the corporate level. For end users, the main recommendation is to keep funds in hardware wallets and away from internet-connected devices whenever possible. They also stress the importance of avoiding the installation of unverified software or software from unknown sources, as well as periodically reviewing the permissions and credentials stored on the system.

For their part, developers and companies in the sector must strengthen their security practices through regular dependency audits and the use of pinned versions in control files such as package-lock.json. Experts also advise disabling automatic updates when there is no prior review, and complementing these actions with monitoring systems capable of detecting anomalies in servers and production environments.

In response to the news, multiple key projects have made public statements assuring that their technical infrastructure has not been affected. Polygon, the leading layer 2 solution for Ethereum, confirmed that both its network and AggLayer remain operational and unaltered.

Hardware wallet manufacturers, for their part, have sought to reassure users: Ledger stated that its devices “are not and have not been at risk” in this attack, highlighting the robustness of a design intended to protect against threats of this kind. Trezor also reported that neither its devices nor the Trezor Suite application were compromised. Nevertheless, security firms urge extreme vigilance in the coming days, given the proliferation of this type of attack exploiting vulnerabilities in widely used JavaScript dependencies.

A reminder about digital trust

The discovery of this attack is a wake-up call for the entire technology and digital finance ecosystem. Blind trust in external libraries is, in itself, an attack vector. In the world of digital assets, where each private key is literally a safe, this reality becomes critical.

As JD Staerk concludes in his report:

“The open-source ecosystem runs on trust, but vigilance is critical.”

The lesson is clear: in the world of distributed networks, security is not optional. Every user, every developer, and every company must take on their role as guardians of their own financial future.

Paradoxically, Bitcoin was born to be honest money. Go here to start exploring the rabbit hole.

Keep reading

More articles and ideas