MAL-2026-17791Malicious code in multichain-rpc (RubyGems)
| Ecosystem | Package | Version |
|---|---|---|
| RubyGems | multichain-rpc | 0.9.1 |
{"modified":"2026-10-11T13:48:54Z","published":"2026-10-11T13:48:54Z","schema_version":"1.7.4","id":"MAL-2026-17791","summary":"Malicious code in multichain-rpc (RubyGems)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b5765482ebcff5ac393edb3ce06164e7c697a00aa7e32c92b1272dc20184b424)\nThe gem's extconf.rb, executed automatically by `gem install` as a native-extension build step, base64-decodes a Ruby payload and runs it via `eval` inside a double-forked, stdio-detached background process. The payload opens a TCP socket to the hardcoded host 45.138.12.177 on port 8089 and bridges it to `/bin/sh`, giving the remote operator an interactive shell on the installer's machine. Execution is gated by developer-host heuristics (presence of ~/.ssh, ~/.gitconfig, ~/.npmrc, ~/.gem/credentials, ~/.bundle, uptime > 1800s) and explicit anti-analysis checks that skip CI, ephemeral, generated-user, and sandbox environments, with a 20-40 minute delay before firing. The rest of the gem is cover: lib/multichain_rpc.rb exports only stub methods (`build_id` returning 'ok', `healthy?` returning true), the README advertises an unrelated name (`bitcoin-rpc-lite`), and extconf.rb declares a native extension (`create_makefile('bitcoin_rpc_lite_native')`) but ships no C sources, so the file's sole purpose is to run the embedded payload. Installing the gem on a developer workstation yields a full-host remote shell to the attacker.\n","affected":[{"package":{"ecosystem":"RubyGems","name":"multichain-rpc"},"versions":["0.9.1"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"ext/multichain_rpc/extconf.rb","sha256":"10218e975f54a4f11fe3954e1b584a5f05054003bf5773c3c2b8cceaa74ba763","tlsh":"9751775acf8359e55aa1c0c045798012faa3ab0a50646875f3ee0868ff59b26c0f12fe"},{"path":"metadata.yaml","sha256":"8834de8777f59908dd519a9c0d89a23d0e15fabbaa813a596be502eba92321b7","tlsh":"b511a0c0ad82fa36f051e2ee68602343b363d50cfe562905d9b78195d3c61afa647431"}]}}}],"references":[{"type":"PACKAGE","url":"https://rubygems.org/gems/multichain-rpc/versions/0.9.1"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-021369","import_time":"2026-10-11T14:17:59.895779205Z","modified_time":"2026-10-11T13:48:54Z","sha256":"b5765482ebcff5ac393edb3ce06164e7c697a00aa7e32c92b1272dc20184b424","source":"amazon-inspector","versions":["0.9.1"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0