Malicious code in perp-funding-rates (RubyGems)
Description
The RubyGem 'perp-funding-rates' version 0.9.1 contains malicious code in its native-extension script that executes during installation. The script decodes and evaluates a hidden Ruby payload that establishes a reverse shell to a hardcoded command-and-control server, allowing remote code execution on the installer's machine. The payload activates only on developer workstations or build systems identified by the presence of specific user files, indicating a targeted attack. This behavior is obfuscated and delayed to evade detection.
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 'perp-funding-rates' RubyGem version 0.9.1 includes a malicious native-extension script (ext/perp_funding_rates/extconf.rb) that lacks legitimate build logic and instead executes a base64-decoded Ruby payload during gem installation. This payload creates a TCP connection to a hardcoded IP (45.138.12.177:8089) and bridges it to a shell (/bin/sh), providing an interactive remote shell to an attacker. The execution is delayed by 20-40 minutes, double-forked, and gated by heuristics checking for developer-related files such as ~/.ssh and ~/.gitconfig, indicating a targeted compromise of developer environments. The obfuscation and execution method suggest this is a dropper designed for stealthy developer workstation compromise rather than a legitimate native extension.
Potential Impact
Successful installation of this gem version on a developer or build system can result in remote code execution by an attacker, who gains an interactive shell on the compromised machine. This allows the attacker to execute arbitrary commands with the privileges of the installing user, potentially leading to further compromise of development environments, source code theft, or supply chain attacks.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing version 0.9.1 of the 'perp-funding-rates' gem. Verify the integrity and source of RubyGems before installation, especially for gems with native extensions. Monitor for suspicious network connections to the IP 45.138.12.177 on port 8089. Since this is a malicious package, removal of the gem and investigation of affected systems is recommended if installed. Patch status is not yet confirmed — check the vendor advisory or RubyGems security notices for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-17793
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["RubyGems"]
Threat ID: 6acc00a32cdf04f656fecb3b
Added to database: 10/11/2026, 21:33:23 UTC
Last enriched: 10/11/2026, 21:44:57 UTC
Last updated: 10/11/2026, 21:44:57 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.