Malicious code in multichain-rpc (RubyGems)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (b5765482ebcff5ac393edb3ce06164e7c697a00aa7e32c92b1272dc20184b424) The 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.
- Products
- multichain-rpc
- Affected versions
- 0.9.1
- Fixed versions
- Not specified
- CVEs
- Not specified
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 01:56 UTC · Revision 1
Source evidence
Malicious code in multichain-rpc (RubyGems)
core-osv · Original sourcePublished 11 Oct 2026, 13:48 UTC
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (b5765482ebcff5ac393edb3ce06164e7c697a00aa7e32c92b1272dc20184b424) The 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.
osv:MAL-2026-17791
multichain-rpc
Fixed versions: Not specified
Complete source record
{
"id": "a19ad9b4a83b61d97b2eb482dd5f53ccf9c4c69e769d3ea7b44a8b1eb51e774c",
"url": "https://osv.dev/vulnerability/MAL-2026-17791",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Malicious code in multichain-rpc (RubyGems)",
"summary": "--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (b5765482ebcff5ac393edb3ce06164e7c697a00aa7e32c92b1272dc20184b424) The 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.",
"evidence": "osv:MAL-2026-17791",
"products": [
{
"name": {
"value": "multichain-rpc",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "0.9.1",
"evidence": "/affected/0/versions"
}
]
}
],
"severity": "unknown",
"structured": {
"id": "MAL-2026-17791",
"aliases": [
"MAL-2026-17791"
],
"affected": [
{
"package": {
"name": "multichain-rpc",
"purl": "pkg:gem/multichain-rpc",
"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/multichain-rpc/MAL-2026-17791.json",
"indicators": {
"evidence_files": [
{
"path": "ext/multichain_rpc/extconf.rb",
"tlsh": "9751775acf8359e55aa1c0c045798012faa3ab0a50646875f3ee0868ff59b26c0f12fe",
"sha256": "10218e975f54a4f11fe3954e1b584a5f05054003bf5773c3c2b8cceaa74ba763"
},
{
"path": "metadata.yaml",
"tlsh": "b511a0c0ad82fa36f051e2ee68602343b363d50cfe562905d9b78195d3c61afa647431",
"sha256": "8834de8777f59908dd519a9c0d89a23d0e15fabbaa813a596be502eba92321b7"
}
]
}
}
}
],
"modified": "2026-10-11T14:30:06.028894095Z",
"provider": "osv",
"references": [
"https://rubygems.org/gems/multichain-rpc/versions/0.9.1"
],
"provider_metadata": {
"malicious-packages-origins": [
{
"id": "IN-MAL-2026-021369",
"sha256": "b5765482ebcff5ac393edb3ce06164e7c697a00aa7e32c92b1272dc20184b424",
"source": "amazon-inspector",
"versions": [
"0.9.1"
],
"import_time": "2026-10-11T14:17:59.895779205Z",
"modified_time": "2026-10-11T13:48:54Z"
}
]
}
},
"related_cves": [],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 286033,
"published_at": "2026-10-11T13:48:54+00:00"
}