The cryptocurrency ecosystem faces an escalating crisis as cybersecurity firm ReversingLabs exposed a sophisticated attack vector: threat actors are weaponizing open-source NPM packages to inject malware directly into Ethereum smart contracts. This discovery marks a dangerous evolution in supply chain attacks against blockchain infrastructure.
DeFi’s Growing Vulnerability: The $3B Damage in 2025
The scale of the threat is staggering. According to Global Ledger’s blockchain analytics, hackers have successfully stolen $3 billion across 119 separate incidents during the first half of 2025—a 150% surge compared to the entire year of 2024. The damage reflects how interconnected DeFi protocols have become easy targets for coordinated attacks exploiting shared vulnerabilities.
A notable case underscores this risk: in July, attackers compromised Arcadia Finance’s Rebalancer contract on Base blockchain, draining $2.5 million by manipulating swap parameters. This incident demonstrated that even established protocols face significant exposure when security gaps exist.
The NPM Malware Campaign: How Zanki and ReversingLabs Uncovered the Attack
ReversingLabs researcher Karlo Zanki’s investigation in early July revealed a disturbing pattern. Threat actors were disguising malicious code within seemingly legitimate NPM packages, with the most dangerous variants identified as colortoolsv2 and mimelib2, both uploaded in July.
These packages operate through a two-file structure designed for maximum stealth. The main component, a script called index.js, contains hidden malicious payloads that activate once installed in a developer’s project. What makes this campaign unprecedented is the delivery mechanism: the malware doesn’t use traditional command-and-control servers, but instead leverages Ethereum smart contracts to store and retrieve URLs for downloading secondary-stage malware.
This approach bypasses conventional security scans by exploiting the immutability and distributed nature of blockchain itself as an obfuscation layer.
The Fake Solana Bot: How Fabricated Legitimacy Fooled Developers
The researchers uncovered a compromised GitHub repository labeled solana-trading-bot-v2 that contained the malicious colortoolsv2 package. The repository appeared trustworthy to casual observers—it boasted thousands of commits, multiple active contributors, and substantial star counts—yet every indicator of legitimacy was artificially constructed.
Any developer installing this package would unknowingly grant attackers access to user wallets, potentially draining all connected funds. This attack combines three layers of deception: a fake-legitimate repository, obfuscated malware code, and blockchain-based command delivery.
Why Smart Contracts Became Attack Infrastructure
The innovation here represents a shift in attacker methodology. Rather than maintaining traditional C2 infrastructure vulnerable to takedown, threat actors now use Ethereum smart contracts as permanent, censorship-resistant malware distribution networks. The decentralized nature of blockchain ensures these command centers remain operational regardless of law enforcement intervention.
According to AMLBot CEO Slava Demchuk, access-control vulnerabilities and smart contract design flaws continue as the primary attack vectors. The composable architecture of DeFi protocols amplifies damage, allowing attackers to chain exploits across multiple platforms simultaneously.
The Supply Chain Extinction Event No One Is Ready For
The broader context is more alarming: 2025 has witnessed an explosion of NPM campaigns. Beyond colortoolsv2, researchers documented the ethers-provider2 and ethers-providerz packages in March, followed by numerous infostealers, downloaders, and droppers discovered throughout the year.
Each new malware variant demonstrates that threat actors have shifted from targeting individual users to compromising the development pipeline itself. A single malicious package can infiltrate thousands of projects, turning open-source repositories into distribution vectors.
What Developers Must Do Now
Security auditors emphasize one critical action: before integrating any external library, developers must conduct thorough assessment of package origins, contributor history, and code authenticity. The era of trusting open-source by default has ended.
The ReversingLabs discoveries show that Ethereum’s smart contracts—originally designed as trustless infrastructure—have become trustless in an entirely different way: attackers are exploiting them as permanent malware distribution channels, secure in the knowledge that blockchain immutability makes removal impossible once deployed.
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
The $3B Threat: How Malware in Coding Libraries Now Targets Ethereum Smart Contracts
The cryptocurrency ecosystem faces an escalating crisis as cybersecurity firm ReversingLabs exposed a sophisticated attack vector: threat actors are weaponizing open-source NPM packages to inject malware directly into Ethereum smart contracts. This discovery marks a dangerous evolution in supply chain attacks against blockchain infrastructure.
DeFi’s Growing Vulnerability: The $3B Damage in 2025
The scale of the threat is staggering. According to Global Ledger’s blockchain analytics, hackers have successfully stolen $3 billion across 119 separate incidents during the first half of 2025—a 150% surge compared to the entire year of 2024. The damage reflects how interconnected DeFi protocols have become easy targets for coordinated attacks exploiting shared vulnerabilities.
A notable case underscores this risk: in July, attackers compromised Arcadia Finance’s Rebalancer contract on Base blockchain, draining $2.5 million by manipulating swap parameters. This incident demonstrated that even established protocols face significant exposure when security gaps exist.
The NPM Malware Campaign: How Zanki and ReversingLabs Uncovered the Attack
ReversingLabs researcher Karlo Zanki’s investigation in early July revealed a disturbing pattern. Threat actors were disguising malicious code within seemingly legitimate NPM packages, with the most dangerous variants identified as colortoolsv2 and mimelib2, both uploaded in July.
These packages operate through a two-file structure designed for maximum stealth. The main component, a script called index.js, contains hidden malicious payloads that activate once installed in a developer’s project. What makes this campaign unprecedented is the delivery mechanism: the malware doesn’t use traditional command-and-control servers, but instead leverages Ethereum smart contracts to store and retrieve URLs for downloading secondary-stage malware.
This approach bypasses conventional security scans by exploiting the immutability and distributed nature of blockchain itself as an obfuscation layer.
The Fake Solana Bot: How Fabricated Legitimacy Fooled Developers
The researchers uncovered a compromised GitHub repository labeled solana-trading-bot-v2 that contained the malicious colortoolsv2 package. The repository appeared trustworthy to casual observers—it boasted thousands of commits, multiple active contributors, and substantial star counts—yet every indicator of legitimacy was artificially constructed.
Any developer installing this package would unknowingly grant attackers access to user wallets, potentially draining all connected funds. This attack combines three layers of deception: a fake-legitimate repository, obfuscated malware code, and blockchain-based command delivery.
Why Smart Contracts Became Attack Infrastructure
The innovation here represents a shift in attacker methodology. Rather than maintaining traditional C2 infrastructure vulnerable to takedown, threat actors now use Ethereum smart contracts as permanent, censorship-resistant malware distribution networks. The decentralized nature of blockchain ensures these command centers remain operational regardless of law enforcement intervention.
According to AMLBot CEO Slava Demchuk, access-control vulnerabilities and smart contract design flaws continue as the primary attack vectors. The composable architecture of DeFi protocols amplifies damage, allowing attackers to chain exploits across multiple platforms simultaneously.
The Supply Chain Extinction Event No One Is Ready For
The broader context is more alarming: 2025 has witnessed an explosion of NPM campaigns. Beyond colortoolsv2, researchers documented the ethers-provider2 and ethers-providerz packages in March, followed by numerous infostealers, downloaders, and droppers discovered throughout the year.
Each new malware variant demonstrates that threat actors have shifted from targeting individual users to compromising the development pipeline itself. A single malicious package can infiltrate thousands of projects, turning open-source repositories into distribution vectors.
What Developers Must Do Now
Security auditors emphasize one critical action: before integrating any external library, developers must conduct thorough assessment of package origins, contributor history, and code authenticity. The era of trusting open-source by default has ended.
The ReversingLabs discoveries show that Ethereum’s smart contracts—originally designed as trustless infrastructure—have become trustless in an entirely different way: attackers are exploiting them as permanent malware distribution channels, secure in the knowledge that blockchain immutability makes removal impossible once deployed.