Malicious code in staking-apr-fetcher (RubyGems)
Description
The RubyGem 'staking-apr-fetcher' version 0.9.1 contains malicious code that executes a backdoor during installation. The gem's build script decodes and runs a hidden Ruby payload that creates a background process connecting to a remote host, providing interactive shell access to the attacker. The payload includes anti-analysis checks to avoid detection in CI environments, sandboxes, or analyst setups. The package has no legitimate functionality and is solely designed to deliver this install-time backdoor.
Affected software
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
Technical Analysis
The 'staking-apr-fetcher' RubyGem (version 0.9.1) declares a native extension whose build script (extconf.rb) decodes a base64-encoded Ruby payload and executes it via eval during gem installation. This payload double-forks a detached background process that opens a TCP connection to a hardcoded IP address (45.138.12.177) on port 8089. It then proxies data bidirectionally between this socket and a locally spawned /bin/sh shell, effectively granting remote interactive shell access to the attacker. The payload activates only if the environment does not resemble CI, sandbox, or analyst environments, and only if system uptime exceeds 1800 seconds and certain developer files exist. The gem is a malicious package masquerading as a staking-related tool but contains no legitimate functionality.
Potential Impact
Successful installation of this gem results in a persistent backdoor on the victim's machine, allowing remote attackers interactive shell access. This compromises system confidentiality, integrity, and availability. The backdoor evades detection by avoiding execution in analysis or sandbox environments and requires certain conditions to be met, increasing stealth. There is no legitimate functionality in the package, indicating it is solely designed for malicious purposes.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing the 'staking-apr-fetcher' gem version 0.9.1. Remove any installations of this gem immediately and investigate systems for signs of compromise, especially connections to 45.138.12.177:8089 and spawned /bin/sh processes. Monitor for suspicious background processes and network activity. Check vendor advisories or trusted security sources for updates or official fixes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-17796
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["RubyGems"]
Threat ID: 6acc00a32cdf04f656fecb36
Added to database: 10/11/2026, 21:33:23 UTC
Last enriched: 10/11/2026, 21:44:36 UTC
Last updated: 10/11/2026, 21:44:36 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.