mev-sandwich-detectRubyGems
Advisory published Updated
mev-sandwich-detect is a confirmed malicious RubyGems package (MAL-2026-17790) that steals credentials and exfiltrates sensitive data (malicious version 0.9.1). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in mev-sandwich-detect (RubyGems)
What this malware does
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.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for mev-sandwich-detect (version 0.9.1).
If you installed it — respond
mev-sandwich-detect is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If mev-sandwich-detect was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks mev-sandwich-detect-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.