GHSA-539m-69r6-rw3m
Malicious code in hd-wallet-generator (RubyGems)
Auswirkung
## Source: amazon-inspector (5d6925082b6aa5db29d0569324b4485976add2368c78635d4be5c52270ee3771) The gem's declared native extension build script ext/hd_wallet_generator/extconf.rb executes a Base64-encoded payload via eval() during `gem install`. The decoded payload opens a TCP socket to the hardcoded remote host 45.138.12.177:8089 and pipes /bin/sh over it (TCPSocket.new + IO.popen(['/bin/sh'],'r+') + IO.copy_stream), granting a remote operator an interactive shell on the installer's host. Execution is wrapped in a double-forked, detached child with a 20–40 minute sleep to decorrelate the connection from the install event. The payload runs only when a battery of evasion checks pass: no CI environment variables, hostname does not match sandbox/firecracker/vagrant/uvm patterns, username does not match generated/analyst patterns (uA\d+, sandbox, tester, analys, scanner), cwd is not under /tmp or /opt/rubygems, machine uptime exceeds 30 minutes, and developer-signal paths exist on disk (~/.ssh, ~/.gitconfig, ~/.gem/credentials, ~/.bundle, ~/.npmrc). No native source files are shipped; create_makefile is a cover stub so the extension-build pretext never actually builds anything. The package metadata name (hd-wallet-generator) and the README description (bitcoin-rpc-lite) disagree, consistent with a disguised dropper. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/ff41f6680a0ebbef2268cdb5daf253d4b400cb05/osv/malicious/rubygems/hd-wallet-generator/MAL-2026-17789.json))
Betroffene Pakete
| Ökosystem | Paket | Betroffen | Behoben in |
|---|---|---|---|
| rubygems | hd-wallet-generator | = 0.9.1 | nicht erfasst |
Schwachstellenklasse
Referenzen
- GitHub-Advisory
- https://github.com/advisories/GHSA-539m-69r6-rw3m
- https://github.com/ossf/malicious-packages/blob/ff41f6680a0ebbef2268cdb5daf253d4b400cb05/osv/malicious/rubygems/hd-wallet-generator/MAL-2026-17789.json
- https://rubygems.org/gems/hd-wallet-generator/versions/0.9.1
- https://github.com/ossf/malicious-packages/blob/fe8668aa76d4203b671f10a31d3cf520d9b26f14/osv/malicious/rubygems/hd-wallet-generator/MAL-2026-17789.json