wallet-hd-deriveRubyGems
Advisory published Updated
wallet-hd-derive is a confirmed malicious RubyGems package (MAL-2026-17800) that steals credentials and exfiltrates sensitive data (malicious version 0.9.1). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in wallet-hd-derive (RubyGems)
What this malware does
The gem is published as a crypto wallet utility but ships no native source; its gemspec declares extconf.rb as an extension so that gem install auto-executes it. extconf.rb decodes a base64-encoded Ruby payload and, after checking for sandbox and analysis signals (CI env, ephemeral hostnames, generated usernames matching patterns such as uA\d+/sandbox/tester/analys/scanner, cwd under /tmp, /opt/rubygems, /workspace, low machine uptime) and confirming developer-identifying files (~/.ssh, ~/.gem/credentials, etc.), double-forks a detached process via fork + Process.setsid, sleeps for 20–40 minutes, then opens a TCP connection to 45.138.12.177:8089 and pipes /bin/sh in both directions using TCPSocket and IO.popen/IO.copy_stream. The shipped library at lib/wallet_hd_derive.rb exposes only two no-op methods (build_id='ok', healthy?=true) and the README is branded for an unrelated package (bitcoin-rpc-lite), confirming the gem exists solely as a delivery vehicle for the install-time backdoor. The destination IP, base64 encoding of the payload, sandbox-evasion gating, and delayed reverse-shell establishment give a remote operator interactive /bin/sh on any developer or CI host that installs the gem.
The OpenSSF Package Analysis project identified 'wallet-hd-derive' @ 0.9.1 (rubygems) as malicious.
It is considered malicious because:
- The package executes one or more commands associated with malicious behavior.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for wallet-hd-derive (version 0.9.1).
If you installed it — respond
wallet-hd-derive is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If wallet-hd-derive 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
- OpenSSF: Package Analysis · finder
Detect & block this
O3 blocks wallet-hd-derive-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.