MAL-2026-17791

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/multichain-rpc/MAL-2026-17791.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-17791
Published
2026-10-11T13:48:54Z
Modified
2026-10-11T14:30:06Z
Summary
Malicious code in multichain-rpc (RubyGems)
Details

-= 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.

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"
            ]
        }
    ]
}
References
Credits

Affected packages

RubyGems / multichain-rpc

Package

Name
multichain-rpc
Purl
pkg:gem/multichain-rpc

Affected ranges

Affected versions

0.*
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"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/multichain-rpc/MAL-2026-17791.json"