Skip to content

MAL-2026-10580 Malicious code in ethers-core (npm)

Unknown
Published
Updated
Exploit status
No public exploit known
Technology
Cloud Platforms

Description


-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (3959190c7c321e0d6f512b89b3c54a6399f3e6f7daecd0563ff753a6a6fed2f5)

Package name typosquats the popular 'ethers' library. package.json declares a postinstall pointing at dist/index.min.js, whose sole top-level statement is eval(Buffer.from('<base64>','base64').toString()). The decoded payload enumerates installer secrets (env vars including PRIVATE_KEY, MNEMONIC, AWS_SECRET_ACCESS_KEY, GITHUB_TOKEN, NPM_TOKEN; files including.env, ~/.aws/credentials, ~/.ssh/id_rsa, ~/.npmrc, wallet.json, keystore.json, seed.txt) and POSTs them to a hardcoded Telegram bot endpoint at api.telegram.org. Any 64-hex or WIF private key recovered is loaded into an ethers.Wallet, balance-checked against cloudflare-eth.com, and drained via sendTransaction to hardcoded attacker ETH/BTC addresses (ETH 0x72bC6c85847136..., BTC bc1qvg0vmlxf2ly248my69r2k6zut8s4q93j9mqvtf); BTC transactions are pushed via blockchain.info/pushtx. Persistence is established by appending 'node /tmp/sys-core.js &' to ~/.bashrc, ~/.zshrc, and ~/.profile, writing ~/.config/autostart/sys-core.desktop, and dropping /tmp/sys-core.js, which polls an attacker webhook via child_process.exec. A companion config/attacker-config.json ships the attacker's Telegram bot token, chat_id, wallet destinations, and target secret path/env-var list.

Upgrade path

1 package: 0 fixed.

PackageAffectedFixed inStatus
npm ethers-core(npm) = 6.13.5; = 6.13.7 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
npm ethers-core(npm) = 6.13.7 No fix listed
npm ethers-core(npm) = 6.13.5 No fix listed

References