solana-keypair (RubyGems): malicious gem exfiltrates Solana/Ethereum keys and credentials on gem install (no CVE)
Severity: critical · Patch status: no-fix-needed · Since 2026-11-17
The RubyGems package solana-keypair v0.1.0 is malicious typosquat-style tooling resembling legitimate Solana libraries. Its lib/ is a stub; the declared native extension's extconf.rb is not a build script but an infostealer: on gem install it reads Solana keypair files (~/.config/solana/id.json and sibling .json), ~/.npmrc, ~/.netrc, ~/.git-credentials, Ethereum keystore files, .env files walked up from the working directory, and crypto-related environment variables (PRIVATEKEY, MNEMONIC, SECRETKEY, WALLETPRIVATEKEY, SOLANAPRIVATEKEY, ETHPRIVATEKEY, NPMTOKEN). Data plus host reconnaissance (hostname, login, uid, cwd, timestamp) is base64-encoded and POSTed to a hardcoded webhook.site collector. It then writes a no-op Makefile so install reports success. Anyone who installed the gem has likely had keys and credentials exfiltrated. No patched version exists; the gem should be removed and treated as compromised.
What to do
- Check whether solana-keypair 0.1.0 was installed anywhere (Gemfile.lock, CI caches, developer machines) and uninstall it
- Rotate all Solana keypairs, Ethereum keys, npm tokens, and any credentials in .npmrc/.netrc/.git-credentials/.env files on affected hosts
- Purge CI/CD caches and rebuild affected environments from clean images
- Audit webhook.site and egress logs for POSTs to the collector to confirm exfiltration scope
- Block webhook.site collector URLs and scrutinize gems with native extensions whose extconf.rb performs no real build
Sources
All live incidents on Threat Watch