@solana-js/web3npm
Advisory published Updated
@solana-js/web3 is a confirmed malicious npm package (MAL-2026-13941) that typosquats a legitimate package to trick installs (malicious version 1.91.3). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in @solana-js/web3 (npm)
What this malware does
Package name @solana-js/web3 impersonates the legitimate @solana/web3.js SDK, and package.json falsely attributes authorship to 'Solana Labs' with a solana.com homepage. The exported API is a non-functional stub (Connection.getBalance returns 0, sendTransaction returns random bytes) — no real Solana client functionality is present. On install, scripts/postinstall.js detects Windows and spawns a hidden PowerShell (-NoP -W Hidden -Exec Bypass) with a base64-encoded command. The decoded PowerShell performs an AMSI bypass via reflection over System.Management.Automation.AmsiUtils, downloads a binary payload from https://files.catbox.moe/a3loxy.bin, and executes it in-process using VirtualAlloc/CreateThread. The postinstall script further hex-escapes API names ('child_process', 'powershell', 'platform', 'win32') and fragments the PowerShell payload to hinder review. The result is arbitrary remote code execution on any Windows host that runs npm install against this package, with the shellcode fetched from an anonymous, mutable file host (files.catbox.moe) — a known-bad-infrastructure dropper pattern.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
TyposquatFind it
Search your lockfiles and build artifacts for @solana-js/web3 (version 1.91.3).
If you installed it — respond
@solana-js/web3 is a typosquat — you almost certainly intended a legitimately-named package. Remove @solana-js/web3, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.
Did it already run?
If @solana-js/web3 was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks @solana-js/web3-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.