Skip to content
Heist/ feed
Back to feed
Unrated

Malicious code in hd-wallet-generator (RubyGems)

Type: advisorySources: OSV

--- _-= Per source details. Do not edit below this line.=-_ ## 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. ## Source: ossf-package-analysis (c08d2f81c67c979fda86b30b0b5b2beae51023a7cd219c12df286a6c6d9cf6cc) The Op

Products
hd-wallet-generator
Affected versions
0.9.1
Fixed versions
Not specified
CVEs
Not specified
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 11:12 UTC · Revision 1

Source evidence

Malicious code in hd-wallet-generator (RubyGems)

core-osv · Original source

Published 11 Oct 2026, 07:25 UTC

--- _-= Per source details. Do not edit below this line.=-_ ## 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. ## Source: ossf-package-analysis (c08d2f81c67c979fda86b30b0b5b2beae51023a7cd219c12df286a6c6d9cf6cc) The Op

osv:MAL-2026-17789

hd-wallet-generator

Fixed versions: Not specified

Complete source record
{
  "id": "9437f9f34a8fa087856b5987fc026e0f71914d5ceb37d9f5c7d8177a95dd8b08",
  "url": "https://osv.dev/vulnerability/MAL-2026-17789",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Malicious code in hd-wallet-generator (RubyGems)",
    "summary": "--- _-= Per source details. Do not edit below this line.=-_ ## 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. ## Source: ossf-package-analysis (c08d2f81c67c979fda86b30b0b5b2beae51023a7cd219c12df286a6c6d9cf6cc) The Op",
    "evidence": "osv:MAL-2026-17789",
    "products": [
      {
        "name": {
          "value": "hd-wallet-generator",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.9.1",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "MAL-2026-17789",
      "aliases": [
        "MAL-2026-17789"
      ],
      "affected": [
        {
          "package": {
            "name": "hd-wallet-generator",
            "purl": "pkg:gem/hd-wallet-generator",
            "ecosystem": "RubyGems"
          },
          "versions": [
            "0.9.1"
          ],
          "database_specific": {
            "cwes": [
              {
                "name": "Embedded Malicious Code",
                "cweId": "CWE-506",
                "description": "The product contains code that appears to be malicious in nature."
              }
            ],
            "source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/hd-wallet-generator/MAL-2026-17789.json",
            "indicators": {
              "evidence_files": [
                {
                  "path": "ext/hd_wallet_generator/extconf.rb",
                  "tlsh": "9751775acf8359e55aa1c0c045798012faa3ab0a50646875f3ee0868ff59b26c0f12fe",
                  "sha256": "10218e975f54a4f11fe3954e1b584a5f05054003bf5773c3c2b8cceaa74ba763"
                }
              ]
            }
          }
        }
      ],
      "modified": "2026-10-13T23:30:06.057913216Z",
      "provider": "osv",
      "references": [
        "https://rubygems.org/gems/hd-wallet-generator/versions/0.9.1"
      ],
      "provider_metadata": {
        "malicious-packages-origins": [
          {
            "id": "IN-MAL-2026-021349",
            "sha256": "5d6925082b6aa5db29d0569324b4485976add2368c78635d4be5c52270ee3771",
            "source": "amazon-inspector",
            "versions": [
              "0.9.1"
            ],
            "import_time": "2026-10-11T14:17:58.222601564Z",
            "modified_time": "2026-10-11T13:45:45Z"
          },
          {
            "sha256": "c08d2f81c67c979fda86b30b0b5b2beae51023a7cd219c12df286a6c6d9cf6cc",
            "source": "ossf-package-analysis",
            "versions": [
              "0.9.1"
            ],
            "import_time": "2026-10-13T23:14:39.574891917Z",
            "modified_time": "2026-10-11T07:25:28Z"
          }
        ]
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 313747,
  "published_at": "2026-10-11T07:25:28+00:00"
}