MAL-2026-17587

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/bitcoin-rpc-lite/MAL-2026-17587.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-17587
Published
2026-10-05T07:50:39Z
Modified
2026-10-06T01:00:16Z
Summary
Malicious code in bitcoin-rpc-lite (RubyGems)
Details

RubyGems runs this gem's native extension script ext/req_throttle_mini/extconf.rb during gem install. The script exits without action on CI runners and sandboxes, based on CI environment variables, the hostname, the username and the working directory. It continues if the system uptime is over 30 minutes and the home directory holds .ssh, .gitconfig, .npmrc, .gem/credentials or .bundle. It then decodes a Base64 Ruby payload, forks twice into a detached process, waits 20 to 40 minutes and opens a reverse shell that connects /bin/sh to 45.138.12.177 on TCP port 8089. The shell reconnects every 30 seconds. The Ruby code in lib/ is a decoy. The RubyGems account reqthrottle_3474 published this gem and 41 others with the same loader on 2026-10-05.


-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (4567a3469d6774fbe9be233375145274adf41f8e7a20521724a9a15606351044)

The gem declares ext/req_throttle_mini/extconf.rb as a native extension, but the ext/ directory ships no C/C++/Rust sources — the extension manifest exists solely to execute Ruby code during gem install. The script performs anti-analysis environment gating (skipping execution when CI env vars are set, hostnames match ephemeral/sandbox patterns such as uvm/firecracker/sandbox/vagrant, usernames look auto-generated, cwd is under /opt/rubygems or /tmp, system uptime is under 1800 seconds, or no developer artifacts like ~/.ssh or ~/.gem/credentials are present), then double-forks a detached background process that sleeps for a randomized 20-40 minutes before eval'ing a base64-decoded Ruby payload. The decoded payload opens a TCP socket to the hardcoded remote 45.138.12.177:8089, spawns /bin/sh via IO.popen, and bridges shell stdio over the socket in a reconnect loop, providing persistent remote shell access on the installer's host. The script closes with a trivial require 'mkmf'; create_makefile('bitcoin_rpc_lite_native') stub to make the extension build appear to succeed.

Source: ossf-package-analysis (19d7f07424a56c9dfe8fe3eb99a1ebd1d5d2a252b468cc86eae4e04c1adc7e7d)

The OpenSSF Package Analysis project identified 'bitcoin-rpc-lite' @ 1.0.0 (rubygems) as malicious.

It is considered malicious because:

  • The package executes one or more commands associated with malicious behavior.
Database specific
{
    "iocs":  {
        "files":  [
            {
                "digests":  {
                    "sha256":  "10218e975f54a4f11fe3954e1b584a5f05054003bf5773c3c2b8cceaa74ba763"
                },
                "note":  "Native extension script that RubyGems runs at install time. It gates on the environment and starts the payload.",
                "paths":  [
                    "ext/req_throttle_mini/extconf.rb"
                ],
                "source":  "PACKAGE_ARCHIVE"
            }
        ],
        "ips":  [
            "45.138.12.177"
        ]
    },
    "malicious-packages-origins":  [
        {
            "id":  "IN-MAL-2026-021038",
            "import_time":  "2026-10-05T16:22:54.007848437Z",
            "modified_time":  "2026-10-05T15:55:08Z",
            "sha256":  "4567a3469d6774fbe9be233375145274adf41f8e7a20521724a9a15606351044",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.0"
            ]
        },
        {
            "import_time":  "2026-10-06T00:50:51.910745358Z",
            "modified_time":  "2026-10-05T07:50:39Z",
            "sha256":  "19d7f07424a56c9dfe8fe3eb99a1ebd1d5d2a252b468cc86eae4e04c1adc7e7d",
            "source":  "ossf-package-analysis",
            "versions":  [
                "1.0.0"
            ]
        }
    ]
}
References
Credits

Affected packages

RubyGems / bitcoin-rpc-lite

Package

Name
bitcoin-rpc-lite
Purl
pkg:gem/bitcoin-rpc-lite

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.0.0

Database specific

cwes
[
    {
        "cweId":  "CWE-506",
        "description":  "The product contains code that appears to be malicious in nature.",
        "name":  "Embedded Malicious Code"
    },
    {
        "cweId":  "CWE-506",
        "description":  "The product contains code that appears to be malicious in nature.",
        "name":  "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files":  [
        {
            "path":  "ext/req_throttle_mini/extconf.rb",
            "sha256":  "10218e975f54a4f11fe3954e1b584a5f05054003bf5773c3c2b8cceaa74ba763",
            "tlsh":  "9751775acf8359e55aa1c0c045798012faa3ab0a50646875f3ee0868ff59b26c0f12fe"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/bitcoin-rpc-lite/MAL-2026-17587.json"