Skip to content
Heist/ feed
Back to feed
Unrated

Malicious code in defi-yield-calculator (RubyGems)

Type: advisorySources: OSV

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (ee8b3e50479b61d2ff6e2f5a19de20473cf8fc3c91f99945aff51f112a617192) The gem ships an ext/extconf.rb that base64-decodes an embedded Ruby payload and runs it via eval inside a double-forked, detached, stdio-nulled background process after a 20–40 minute sleep. Execution is gated by anti-analysis checks that skip CI runners, ephemeral/sandbox hostnames, generated analyst usernames, common analysis working directories, low-uptime hosts, and hosts missing developer artifacts (~/.ssh, ~/.gitconfig, ~/.gem/credentials, ~/.bundle, ~/.npmrc), so the payload only fires on real developer machines. The decoded payload opens a TCPSocket to the hardcoded host 45.138.12.177 on port 8089 and bidirectionally pipes it to /bin/sh in an infinite reconnect loop, giving a remote operator persistent interactive shell access to the installer's host. The gemspec presents the package as a 'defi yield calculator' with a trivial lib stub exposing only VERSION/build_id/healthy?, the README is copied from an unrelated 'bitcoin-rpc-lite' project, and create_makefile targets 'bitcoin_rpc_lite_native' despite no C/C++ sources being shipped — the native-extension declaration exists solely to trigger the dropper during `gem install`.

Products
defi-yield-calculator
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 defi-yield-calculator (RubyGems)

core-osv · Original source

Published 11 Oct 2026, 13:45 UTC

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (ee8b3e50479b61d2ff6e2f5a19de20473cf8fc3c91f99945aff51f112a617192) The gem ships an ext/extconf.rb that base64-decodes an embedded Ruby payload and runs it via eval inside a double-forked, detached, stdio-nulled background process after a 20–40 minute sleep. Execution is gated by anti-analysis checks that skip CI runners, ephemeral/sandbox hostnames, generated analyst usernames, common analysis working directories, low-uptime hosts, and hosts missing developer artifacts (~/.ssh, ~/.gitconfig, ~/.gem/credentials, ~/.bundle, ~/.npmrc), so the payload only fires on real developer machines. The decoded payload opens a TCPSocket to the hardcoded host 45.138.12.177 on port 8089 and bidirectionally pipes it to /bin/sh in an infinite reconnect loop, giving a remote operator persistent interactive shell access to the installer's host. The gemspec presents the package as a 'defi yield calculator' with a trivial lib stub exposing only VERSION/build_id/healthy?, the README is copied from an unrelated 'bitcoin-rpc-lite' project, and create_makefile targets 'bitcoin_rpc_lite_native' despite no C/C++ sources being shipped — the native-extension declaration exists solely to trigger the dropper during `gem install`.

osv:MAL-2026-17783

defi-yield-calculator

Fixed versions: Not specified

Complete source record
{
  "id": "1f2c137a6f9ec3bd6def4c5b6959ba62dcf90449d1212927159c325914fa9328",
  "url": "https://osv.dev/vulnerability/MAL-2026-17783",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Malicious code in defi-yield-calculator (RubyGems)",
    "summary": "--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (ee8b3e50479b61d2ff6e2f5a19de20473cf8fc3c91f99945aff51f112a617192) The gem ships an ext/extconf.rb that base64-decodes an embedded Ruby payload and runs it via eval inside a double-forked, detached, stdio-nulled background process after a 20–40 minute sleep. Execution is gated by anti-analysis checks that skip CI runners, ephemeral/sandbox hostnames, generated analyst usernames, common analysis working directories, low-uptime hosts, and hosts missing developer artifacts (~/.ssh, ~/.gitconfig, ~/.gem/credentials, ~/.bundle, ~/.npmrc), so the payload only fires on real developer machines. The decoded payload opens a TCPSocket to the hardcoded host 45.138.12.177 on port 8089 and bidirectionally pipes it to /bin/sh in an infinite reconnect loop, giving a remote operator persistent interactive shell access to the installer's host. The gemspec presents the package as a 'defi yield calculator' with a trivial lib stub exposing only VERSION/build_id/healthy?, the README is copied from an unrelated 'bitcoin-rpc-lite' project, and create_makefile targets 'bitcoin_rpc_lite_native' despite no C/C++ sources being shipped — the native-extension declaration exists solely to trigger the dropper during `gem install`.",
    "evidence": "osv:MAL-2026-17783",
    "products": [
      {
        "name": {
          "value": "defi-yield-calculator",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.9.1",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "MAL-2026-17783",
      "aliases": [
        "MAL-2026-17783"
      ],
      "affected": [
        {
          "package": {
            "name": "defi-yield-calculator",
            "purl": "pkg:gem/defi-yield-calculator",
            "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/defi-yield-calculator/MAL-2026-17783.json",
            "indicators": {
              "evidence_files": [
                {
                  "path": "ext/defi_yield_calculator/extconf.rb",
                  "tlsh": "9751775acf8359e55aa1c0c045798012faa3ab0a50646875f3ee0868ff59b26c0f12fe",
                  "sha256": "10218e975f54a4f11fe3954e1b584a5f05054003bf5773c3c2b8cceaa74ba763"
                },
                {
                  "path": "metadata.yaml",
                  "tlsh": "4d21614065c3e476fc02e3d7a8402307e393d95cbe9a7a40b69785dba3845697747471",
                  "sha256": "006f9133255c87219662453c5940dcbc1ae5abe7d4cc7a6a4809a1cf0a7f4a12"
                }
              ]
            }
          }
        }
      ],
      "modified": "2026-10-11T14:30:06.011549835Z",
      "provider": "osv",
      "references": [
        "https://rubygems.org/gems/defi-yield-calculator/versions/0.9.1"
      ],
      "provider_metadata": {
        "malicious-packages-origins": [
          {
            "id": "IN-MAL-2026-021347",
            "sha256": "ee8b3e50479b61d2ff6e2f5a19de20473cf8fc3c91f99945aff51f112a617192",
            "source": "amazon-inspector",
            "versions": [
              "0.9.1"
            ],
            "import_time": "2026-10-11T14:17:58.055811336Z",
            "modified_time": "2026-10-11T13:45:29Z"
          }
        ]
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 286030,
  "published_at": "2026-10-11T13:45:29+00:00"
}