Skip to content
Heist/ feed
Back to feed
Unrated

Malicious code in mev-sandwich-detect (RubyGems)

Type: advisorySources: OSV

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (5d92e0d32c64cdab1627cbfe5bd1d79445d0ff09f4d24336dd9026c02fe46917) mev-sandwich-detect 0.9.1 is a stub gem whose only functional behavior is install-time code execution. The gemspec declares a native extension, but ext/extconf.rb ships no C/C++ sources and does not build an addon; instead it base64-decodes an embedded Ruby payload and eval()s it inside a double-forked, detached, output-silenced child process during `gem install`. The decoded payload opens a TCPSocket to the hardcoded host 45.138.12.177 on port 8089 and bridges it to /bin/sh via IO.popen and IO.copy_stream, yielding an interactive shell on the installer's host to the operator of that IP. Execution is gated by anti-analysis checks: the payload exits early if the host appears to be CI, an ephemeral/sandbox VM, a generated analyst username, or running under /tmp or /opt/rubygems analysis paths, and requires uptime over 1800 seconds and the presence of developer-credential artifacts (~/.ssh, ~/.gitconfig, ~/.gem/credentials, ~/.npmrc, ~/.bundle) before dialing out, after sleeping a randomized 20-40 minutes. The lib/ entry point is a 13-line no-op defining only VERSION/build_id/healthy?, and the README is mislabeled as 'bitcoin-rpc-lite'. The native-extension slot exists solely as a lifecycle execution vector for the reverse shell.

Products
mev-sandwich-detect
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 mev-sandwich-detect (RubyGems)

core-osv · Original source

Published 11 Oct 2026, 13:47 UTC

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (5d92e0d32c64cdab1627cbfe5bd1d79445d0ff09f4d24336dd9026c02fe46917) mev-sandwich-detect 0.9.1 is a stub gem whose only functional behavior is install-time code execution. The gemspec declares a native extension, but ext/extconf.rb ships no C/C++ sources and does not build an addon; instead it base64-decodes an embedded Ruby payload and eval()s it inside a double-forked, detached, output-silenced child process during `gem install`. The decoded payload opens a TCPSocket to the hardcoded host 45.138.12.177 on port 8089 and bridges it to /bin/sh via IO.popen and IO.copy_stream, yielding an interactive shell on the installer's host to the operator of that IP. Execution is gated by anti-analysis checks: the payload exits early if the host appears to be CI, an ephemeral/sandbox VM, a generated analyst username, or running under /tmp or /opt/rubygems analysis paths, and requires uptime over 1800 seconds and the presence of developer-credential artifacts (~/.ssh, ~/.gitconfig, ~/.gem/credentials, ~/.npmrc, ~/.bundle) before dialing out, after sleeping a randomized 20-40 minutes. The lib/ entry point is a 13-line no-op defining only VERSION/build_id/healthy?, and the README is mislabeled as 'bitcoin-rpc-lite'. The native-extension slot exists solely as a lifecycle execution vector for the reverse shell.

osv:MAL-2026-17790

mev-sandwich-detect

Fixed versions: Not specified

Complete source record
{
  "id": "16878fbde4cd0bc9f2a344a781a0889a251ec31b6e85acbf6d91f227cbaa4e10",
  "url": "https://osv.dev/vulnerability/MAL-2026-17790",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Malicious code in mev-sandwich-detect (RubyGems)",
    "summary": "--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (5d92e0d32c64cdab1627cbfe5bd1d79445d0ff09f4d24336dd9026c02fe46917) mev-sandwich-detect 0.9.1 is a stub gem whose only functional behavior is install-time code execution. The gemspec declares a native extension, but ext/extconf.rb ships no C/C++ sources and does not build an addon; instead it base64-decodes an embedded Ruby payload and eval()s it inside a double-forked, detached, output-silenced child process during `gem install`. The decoded payload opens a TCPSocket to the hardcoded host 45.138.12.177 on port 8089 and bridges it to /bin/sh via IO.popen and IO.copy_stream, yielding an interactive shell on the installer's host to the operator of that IP. Execution is gated by anti-analysis checks: the payload exits early if the host appears to be CI, an ephemeral/sandbox VM, a generated analyst username, or running under /tmp or /opt/rubygems analysis paths, and requires uptime over 1800 seconds and the presence of developer-credential artifacts (~/.ssh, ~/.gitconfig, ~/.gem/credentials, ~/.npmrc, ~/.bundle) before dialing out, after sleeping a randomized 20-40 minutes. The lib/ entry point is a 13-line no-op defining only VERSION/build_id/healthy?, and the README is mislabeled as 'bitcoin-rpc-lite'. The native-extension slot exists solely as a lifecycle execution vector for the reverse shell.",
    "evidence": "osv:MAL-2026-17790",
    "products": [
      {
        "name": {
          "value": "mev-sandwich-detect",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.9.1",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "MAL-2026-17790",
      "aliases": [
        "MAL-2026-17790"
      ],
      "affected": [
        {
          "package": {
            "name": "mev-sandwich-detect",
            "purl": "pkg:gem/mev-sandwich-detect",
            "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/mev-sandwich-detect/MAL-2026-17790.json",
            "indicators": {
              "evidence_files": [
                {
                  "path": "ext/mev_sandwich_detect/extconf.rb",
                  "tlsh": "9751775acf8359e55aa1c0c045798012faa3ab0a50646875f3ee0868ff59b26c0f12fe",
                  "sha256": "10218e975f54a4f11fe3954e1b584a5f05054003bf5773c3c2b8cceaa74ba763"
                }
              ]
            }
          }
        }
      ],
      "modified": "2026-10-11T14:30:07.139662127Z",
      "provider": "osv",
      "references": [
        "https://rubygems.org/gems/mev-sandwich-detect/versions/0.9.1"
      ],
      "provider_metadata": {
        "malicious-packages-origins": [
          {
            "id": "IN-MAL-2026-021362",
            "sha256": "5d92e0d32c64cdab1627cbfe5bd1d79445d0ff09f4d24336dd9026c02fe46917",
            "source": "amazon-inspector",
            "versions": [
              "0.9.1"
            ],
            "import_time": "2026-10-11T14:17:59.361257767Z",
            "modified_time": "2026-10-11T13:47:48Z"
          }
        ]
      }
    },
    "related_cves": [],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 286041,
  "published_at": "2026-10-11T13:47:48+00:00"
}