Skip to main content

Malicious code in @solana-labs/web3.js (npm)

0
Critical
Published: 06/10/2026 (06/10/2026, 18:37:05 UTC)
Source: GCVE Database
Product: @solana-labs/web3.js

Description

The npm package '@solana-labs/web3.js' is a malicious impersonation of the legitimate '@solana/web3.js' package. During installation, it runs a postinstall script that performs sandbox evasion checks and, if not detected, steals sensitive credentials and crypto keys from the victim's environment. It exfiltrates this data to an attacker-controlled Telegram bot and establishes a reverse-shell backdoor for remote command execution. Persistence is maintained via a cron job, and a hardcoded Solana wallet address is used for theft.

Affected software

npmghsa
@solana-labs/web3.js
Affected versions
=1.0.7=1.0.0=1.0.10=1.0.6=1.0.8=1.98.112=1.0.2=1.0.3=1.0.4=1.0.5=1.98.102=1.98.104=1.98.107=1.98.108=1.98.109=1.98.110=1.98.111

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/08/2026, 06:38:07 UTC

Technical Analysis

The malicious '@solana-labs/web3.js' package impersonates the legitimate '@solana/web3.js' package and re-exports it to avoid suspicion. Its postinstall script (install.js) performs environment checks to evade sandbox and analysis tools. If no analysis is detected, it enumerates and steals sensitive secrets including SSH private keys, AWS credentials, Solana and Ethereum private keys, and various environment tokens. The stolen data is tagged by type and exfiltrated via a Telegram bot using obfuscated credentials. The script then enters a command-and-control loop, accepting commands to retrieve keys, environment variables, execute shell commands, and more, effectively providing a full remote shell. Persistence is achieved by adding a cron job that runs the malicious script on reboot. A hardcoded Solana wallet address is included for direct theft of funds.

Potential Impact

This malicious package compromises the security of any system where it is installed by stealing critical credentials and private keys, including SSH keys, AWS credentials, and cryptocurrency wallets. It enables attackers to exfiltrate sensitive data and gain full remote command execution on the victim system, allowing further compromise and potential financial theft via the hardcoded Solana wallet address. The presence of a persistent backdoor increases the risk of long-term unauthorized access.

Mitigation Recommendations

No official patch or remediation is currently documented. Users should immediately cease using the '@solana-labs/web3.js' package and verify that only the legitimate '@solana/web3.js' package is installed from trusted sources. Remove any installations of the malicious package and inspect systems for persistence mechanisms such as unauthorized cron jobs. Rotate any potentially compromised credentials and keys. Monitor for suspicious network activity related to Telegram API endpoints. Patch status is not yet confirmed — check vendor advisories or trusted security sources for updates.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-5525
Osv Schema Version
1.7.4
Aliases
["GHSA-v45f-fr53-php7"]
Ecosystems
["npm"]

Threat ID: 6a96f31bacd9273b49e49932

Added to database: 09/01/2026, 15:45:31 UTC

Last enriched: 09/08/2026, 06:38:07 UTC

Last updated: 10/03/2026, 11:39:00 UTC

Views: 37

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses