@cryptobaby/cryptopapi@6.6.6
Malicious code in @cryptobaby/cryptopapi (npm)
Analysis
This package is a Solana wallet drainer. The main entry (index.js, executed as a self-invoking function on import) walks parent directories to locate a .env file and reads PRIVATE_KEY and RPC_ENDPOINT from it, reconstructing a Solana Keypair (bs58-decoded or JSON byte array). It queries the current SOL/USD price from api[.]coingecko[.]com/api/v3/simple/price?ids=solana and, if the wallet's USD balance exceeds a $1000 threshold, builds and signs a VersionedTransaction that sweeps the entire balance (minus the transaction fee and a 0.001 SOL reserve) to the hardcoded attacker address 7y6drvHexdLjKDMeWPRwTdQt1NUd7tAZNmeZNkoAYcKk. The logic is hidden behind a string-array obfuscation layer. C2/IOC: drain destination Solana address 7y6drvHexdLjKDMeWPRwTdQt1NUd7tAZNmeZNkoAYcKk.
- analyzed by
- Leitwacht
- first seen
- May 27, 2026, 04:18 AM
- analyzed
- May 27, 2026, 04:36 AM
Related advisories
- @cryptobaby/cryptopapi@6.6.7 same package
- vitest-preview-pro@10.0.7
- @coralxyz/anchor@0.30.2
- hardhat-cap@2.21.1
- dolyame-ui-draghoc@35.8.1
- dolyame-ui-tablemobile@35.8.1
- txrand@1.0.6
- khanbmnxls@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.