Hackers Hide Credential-Stealing Worm in Ruby Gem That Can Wipe Developers’ Home Directories

A malicious RubyGems package that steals developer credentials during installation and includes a mechanism capable of deleting the user’s home directory. The package, strutil-core version 1.0.1, carries a 5.48 MB JavaScript worm disguised as a simple string utility.

The publisher, jamnajiea, uploaded a clean version on November 1, 2026, then released the malicious update less than two hours later.

Socket’s AI Scanner detected the threat within 70 seconds. RubyGems removed both versions roughly five hours after the malicious release.

Researchers identified the payload as a later build of testmetest, a worm linked to the Miasma family and publicly available Shai-Hulud toolkit. However, shared code does not establish that the same attackers operated every variant.

Socket found no public projects depending on strutil-core and confirmed no victims or successful downstream infections.

Sandbox testing verified installation-time execution and credential-file access; other capabilities were identified through static code analysis.

Ruby Worm Steals Credentials

The gem abuses RubyGems’ native extension process. Its extconf.rb script downloads Bun 1.2.18 from official GitHub releases and uses that runtime to execute the bundled index.js payload on supported Linux and macOS systems.

The installer then creates a Makefile with empty build targets, allowing installation to finish normally. Developers do not need to load the library: installing the malicious version, directly or through Bundler, is enough to trigger execution.

The worm targets cloud accounts, package registries, Git services, SSH keys, cryptocurrency wallets, and AI coding tools.

Sandbox analysis recorded access to 51 credential stores, including AWS credentials, npm configuration, Kubernetes settings, and Claude and Codex authentication files.

The build lineage from the June Miasma toolkit to strutil-core. The RubyGems injector dates to June, while the backdoor, wiper and GitHub markers are shared with testmetest (Source: socket)
The build lineage from the June Miasma toolkit to strutil-core. The RubyGems injector dates to June, while the backdoor, wiper and GitHub markers are shared with testmetest (Source: socket)

Collected information is encrypted using AES-256-GCM and sent to paleasbest[.]top. GitHub and GitLab provide fallback routes for exporting stolen data.

The code also contains routines for republishing infected RubyGems, npm, and PyPI packages, although researchers did not confirm successful propagation.

A Python backdoor maintains access through a Linux systemd user service or macOS LaunchAgent. It checks GitHub commit messages hourly for attacker-signed URLs, then downloads and executes Python scripts.

The payload also modifies AI tool configurations, adding workspace-tools MCP entries, session hooks, and repository instructions that can trigger execution again, depending on workspace trust and approval settings.

The most dangerous feature is a conditional wiper named net-health-checker. When installed through the GitHub-token exfiltration path, it checks a stolen token every 45 seconds for up to 48 hours.

If GitHub returns HTTP 401 or 403, the monitor runs commands that delete the user’s home directory. Revoking a stolen token can therefore trigger destruction. This monitor is not installed on every infected system, socket said.

Indicators of Compromise

TypeIndicatorDescription
Malicious packagestrutil-core version 1.0.1RubyGems package containing the credential-stealing worm
Publisher accountjamnajieaRubyGems account that published the package

Note: IP addresses and domains are intentionally defanged (e.g., [.]) to prevent accidental resolution or hyperlinking. Re-fang only within controlled threat intelligence platforms such as MISP, VirusTotal, or your SIEM.

Join 16,000+ SOC teams using ANY.RUN to streamline threat investigations and reduce manual effort. Explore for your team 

Varshini
Varshini
Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies..

Trending News

Related Stories