Skip to main content

Malicious code in mev-sandwich-detect (RubyGems)

0
High
Published: 10/11/2026 (10/11/2026, 13:47:48 UTC)
Source: GCVE Database
Product: mev-sandwich-detect

Description

The RubyGem 'mev-sandwich-detect' version 0.9.1 is a malicious package that executes code at install time. It contains a stub gemspec with a native extension that does not build any addon but instead decodes and executes a hidden Ruby payload. This payload establishes a reverse shell to a hardcoded IP address, providing an interactive shell to an attacker. The payload includes anti-analysis checks to avoid execution in sandboxed or analyst environments and delays execution to evade detection. The package masquerades as a legitimate gem with misleading metadata.

Affected software

RubyGemsghsa
mev-sandwich-detect
Affected versions
=0.9.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/11/2026, 21:45:10 UTC

Technical Analysis

The 'mev-sandwich-detect' RubyGem version 0.9.1 is a malicious stub gem that performs install-time code execution by decoding and eval()ing an embedded Ruby payload. This payload creates a reverse shell by opening a TCP socket to 45.138.12.177:8089 and bridging it to /bin/sh, allowing remote command execution on the host machine. Execution is conditioned on anti-analysis checks such as environment detection (CI, sandbox, analyst usernames), uptime greater than 1800 seconds, and presence of developer credential files. The native extension declared in the gemspec is a vector for lifecycle execution rather than a genuine compiled addon. The gem's README is misleadingly labeled, and the main library code is a no-op, indicating the package's sole purpose is malicious.

Potential Impact

Successful installation of this gem results in remote code execution on the host system via a reverse shell to a remote attacker-controlled server. This compromises the confidentiality, integrity, and availability of the affected system. The attacker gains interactive shell access, enabling arbitrary command execution. The anti-analysis and delay mechanisms increase the likelihood of persistent undetected compromise in developer environments.

Mitigation Recommendations

No official patch or remediation is available for this malicious package. The best mitigation is to avoid installing 'mev-sandwich-detect' version 0.9.1 and to audit existing systems for its presence. Remove the gem if found and investigate any suspicious network connections to 45.138.12.177 on port 8089. Employ supply chain security measures such as verifying gem provenance and using trusted sources. Monitor for similar malicious packages in RubyGems repositories.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-17790
Osv Schema Version
1.7.4
Ecosystems
["RubyGems"]

Threat ID: 6acc00a32cdf04f656fecb3d

Added to database: 10/11/2026, 21:33:23 UTC

Last enriched: 10/11/2026, 21:45:10 UTC

Last updated: 10/11/2026, 21:45:10 UTC

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses