Solana Wallet遭遇NPM恶意包攻击 隐藏 Private Key窃取功能

Solana user assets stolen, malicious NPM package hides Private Key theft functionality

In early July 2025, a cryptocurrency user sought help from the security team, stating that their wallet assets were stolen after using an open-source project on GitHub called solana-pumpfun-bot. After an in-depth investigation, security experts revealed a meticulously planned attack.

Malicious NPM package steals Private Key, Solana users' assets are stolen

Investigators first examined the GitHub project and found that its code submission timestamps were unusually concentrated, lacking the characteristics of continuous updates. Further analysis of the project dependencies revealed a suspicious third-party package called crypto-layout-utils. This package has been removed from the official NPM registry, and the specified version does not appear in the official history.

Malicious NPM package steals Private Key, Solana users' assets are stolen

By examining the package-lock.json file, experts found that the attacker cleverly replaced the download link for crypto-layout-utils with a file from a GitHub repository. This replaced package was highly obfuscated, increasing the difficulty of analysis. It was ultimately confirmed that this was a malicious NPM package capable of scanning for sensitive files on the user's computer and uploading any discovered wallet Private Keys to a server controlled by the attacker.

Malicious NPM package steals Private Key, Solana user assets are stolen

Malicious NPM package steals Private Key, Solana users' assets are stolen

Malicious NPM package steals Private Key, Solana users' assets are stolen

The investigation also found that the attackers may have controlled multiple GitHub accounts to distribute malware and enhance project credibility. They increased project popularity through actions such as Fork and Star, enticing more users to download and use it. Some Fork projects also used another malicious package, bs58-encrypt-utils-1.0.3.

Malicious NPM package steals Private Key, Solana user assets are stolen

Malicious NPM package steals Private Key, Solana user assets are stolen

Malicious NPM package steals Private Key, Solana users' assets are stolen

This attack combined social engineering and technical means, exhibiting a high degree of deception. The attackers disguised themselves as legitimate open-source projects, leveraging users' trust in GitHub projects to trick them into downloading and running code with malicious dependencies, ultimately leading to the leakage of the Private Key and theft of assets.

Malicious NPM Package Steals Private Key, Solana Users' Assets Stolen

Security experts recommend that developers and users remain highly vigilant towards GitHub projects of unknown origin, especially when it involves wallet or Private Key operations. If debugging such projects is necessary, it is best to do so in a separate environment that does not contain sensitive data.

Malicious NPM package steals Private Key, Solana users' assets are stolen

This event highlights the security challenges faced by the open-source community, reminding us to exercise extra caution when using third-party code, while also calling for strengthened security oversight of the open-source ecosystem.

Malicious NPM package steals Private Key, Solana user assets are stolen

SOL-5.82%
View Original
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.
  • Reward
  • 6
  • Share
Comment
0/400
GamefiEscapeArtistvip
· 16h ago
These days, projects don't even check the goods.
View OriginalReply0
Web3ProductManagervip
· 16h ago
ngl these retention metrics on sol npm attacks are getting wild... user churn rate hitting 100% in hours fr fr
Reply0
VirtualRichDreamvip
· 16h ago
Speechless, suckers are really easy to play.
View OriginalReply0
NFTFreezervip
· 17h ago
Wow, they're stealing money again!
View OriginalReply0
FlashLoanKingvip
· 17h ago
Slipped away, slipped away, it looks creepy.
View OriginalReply0
MEVSupportGroupvip
· 17h ago
The freeloaders are in trouble again.
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)