Threat reportSupply ChainTL-2026-7300
RubyGems Malicious Gem Surge 2026: Credential-Stealing Worms, Cryptojacking, Typosquats and Dormant-Package Hijacks
Throughout 2026 RubyGems saw multiple distinct malicious-package campaigns: the strutil-core 1.0.1 worm (Shai-Hulud/Miasma descendant), the knot-theory 'Secret Snatchers' credential stealers, the GemStuffer mass-publishing wave, XMRig cryptojacking typosquats, SleeperGem dormant-package hijacks, and bundler typosquats delivering a Rust stealer. Install-time execution via extconf.rb, Bun-delivered encrypted payloads, theft of cloud/CI/registry/AI-tool credentials and a revocation-triggered home-directory wiper make this a high-impact software supply-chain threat. First disclosed .
Key facts
| Identifiers | TL-2026-7300 |
|---|---|
| Also known as | Secret Snatchers, GemStuffer, SleeperGem, Shai-Hulud descendant, Miasma, testmetest worm |
| Severity | HIGH |
| First disclosed | |
| Affected products | RubyGems strutil-core; RubyGems knot-theory gems (knot-activesupport-logger, knot-devise-jwt-helper, knot-rack-session-store, knot-rails-assets-pipeline, knot-rspec-formatter-json); RubyGems git_credential_manager; RubyGems Dendreo; RubyGems fastlane-plugin-run_tests_firebase_testlab |
| Weaknesses (CWE) | CWE-506 |
| Malware | Ruby, Shai-Hulud, xmrig |
| Tools | XMRig |
| MITRE ATT&CK techniques | T1003.007 Proc Filesystem, T1027 Obfuscated Files or Information, T1036.005 Match Legitimate Resource Name or Location, T1059.004 Unix Shell, T1059.006 Python, T1059.007 JavaScript, T1098.004 SSH Authorized Keys, T1102.001 Dead Drop Resolver, T1140 Deobfuscate/Decode Files or Information, T1195.001 Compromise Software Dependencies and Development Tools, T1195.002 Compromise Software Supply Chain, T1204.002 Malicious File and 11 more in the attack flow |
| Motivation | FINANCIAL |
| Target sectors | technology, software development, cloud services, finance |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 13 cited sources |
Detection coverage
As of 2026-12-02, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-7300 across Splunk SPL, Microsoft KQL and Sigma, covering 26 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: RubyGems Malicious Gem Install-Time Execution — extconf.rb Spawning Downloader/Bun (TL-2026-7300, SPL)
Behaviour-first detection of the install-time execution used across the 2026 RubyGems campaigns (strutil-core 1.0.1, knot-theory Secret Snatchers, SleeperGem git_credential_manager, bundler typosquats): a gem/bundle install or extconf.rb build script spawning curl/wget/PowerShell/the Bun runtime, or touching campaign IOCs (paleasbest.top, git.disroot.org/git-ecosystem, the knot-theory webhook.site path), plus direct installs of the named malicious gems.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1195.002, T1195.001, T1059.004, T1059.007, T1204.002
- Data sources: sysmon_linux (index=sysmon, sourcetype=sysmon:linux), sysmon_windows (index=sysmon, sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational), defender_for_endpoint (DeviceProcessEvents)
- Severity: high
- Confidence: high
Splunk SPL
index=sysmon (sourcetype="sysmon:linux" OR sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational") EventCode=1 (((ParentCommandLine="*extconf.rb*" OR ParentCommandLine="*bundle install*" OR ParentCommandLine="*gem install*") (Image="*/bun" OR Image="*bun.exe" OR Image="*/curl" OR Image="*/wget" OR Image="*powershell.exe" OR CommandLine="*oven-sh/bun*" OR CommandLine="*paleasbest.top*" OR CommandLine="*git.disroot.org/git-ecosystem*" OR CommandLine="*webhook.site/49c21843-c27c-4a1b-b1f6-037c3998055f*")) OR (CommandLine="*gem*install*" (CommandLine="*strutil-core*" OR CommandLine="*knot-activesupport-logger*" OR CommandLine="*knot-devise-jwt-helper*" OR CommandLine="*knot-rack-session-store*" OR CommandLine="*knot-rails-assets-pipeline*" OR CommandLine="*knot-rspec-formatter-json*" OR CommandLine="*git_credential_manager*"))) | stats count min(_time) as first_seen max(_time) as last_seen values(CommandLine) as child_cmd values(ParentCommandLine) as parent_cmd by host, User, Image | convert ctime(first_seen) ctime(last_seen)Microsoft KQL
let malGems = dynamic(["strutil-core","knot-activesupport-logger","knot-devise-jwt-helper","knot-rack-session-store","knot-rails-assets-pipeline","knot-rspec-formatter-json","git_credential_manager"]);
let iocs = dynamic(["paleasbest.top","git.disroot.org/git-ecosystem","webhook.site/49c21843-c27c-4a1b-b1f6-037c3998055f","oven-sh/bun"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (InitiatingProcessCommandLine has_any ("extconf.rb","bundle install","gem install") and (FileName in~ ("bun","bun.exe","curl","curl.exe","wget","powershell.exe") or ProcessCommandLine has_any (iocs)))
or (ProcessCommandLine has "gem" and ProcessCommandLine has "install" and ProcessCommandLine has_any (malGems))
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine
| order by Timestamp descSigma
title: RubyGems extconf.rb Install-Time Downloader or Known Malicious Gem Install
id: 7c1e4b52-3a8d-4f0e-9b6a-2d5f8e1c7a93
status: experimental
description: Detects gem/bundle install-time execution of extconf.rb spawning a downloader or the Bun runtime, or installation of gems named in the 2026 RubyGems malicious-gem campaigns (strutil-core, knot-theory, git_credential_manager).
references:
- https://socket.dev/blog/shai-hulud-descendant-malicious-ruby-gem
- https://www.reversinglabs.com/blog/rubygems-is-no-longer-sitting-out-the-2026-almanac-of-malicious-gems
author: Threadlinqs Team
date: 2026-12-02
tags:
- attack.initial-access
- attack.t1195.001
- attack.t1195.002
- attack.execution
- attack.t1059.004
- attack.t1059.007
- attack.t1204.002
- attack.command-and-control
- attack.t1105
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentCommandLine|contains:
- 'extconf.rb'
- 'bundle install'
- 'gem install'
selection_child_img:
Image|endswith:
- '/bun'
- '/curl'
- '/wget'
selection_child_cmd:
CommandLine|contains:
- 'oven-sh/bun'
- 'paleasbest.top'
- 'git.disroot.org/git-ecosystem'
- 'webhook.site/49c21843-c27c-4a1b-b1f6-037c3998055f'
selection_gem_verb:
CommandLine|contains|all:
- 'gem'
- 'install'
selection_gem_name:
CommandLine|contains:
- 'strutil-core'
- 'knot-activesupport-logger'
- 'knot-devise-jwt-helper'
- 'knot-rack-session-store'
- 'knot-rails-assets-pipeline'
- 'knot-rspec-formatter-json'
- 'git_credential_manager'
condition: (selection_parent and 1 of selection_child_*) or (selection_gem_verb and selection_gem_name)
falsepositives:
- Legitimate native-extension gems whose extconf.rb downloads vendored sources with curl or wget
- Security teams deliberately installing the named gems in a sandbox for analysis
level: highKnown false positives:
- Legitimate native-extension gems whose extconf.rb downloads vendored sources with curl or wget
- Security or research teams intentionally installing the named gems in a sandbox for analysis
Tuning notes: Scope to build hosts and CI runners first. Allowlist known-good gems that legitimately download sources in extconf.rb (by parent gem path). Rename the index/sourcetype to your Sysmon-for-Linux ingestion. Retain the IOC string matches even if you tune the generic curl/wget branch.
- RubyGems Malicious Gem Install-Time Execution — extconf.rb Spawning Downloader/Bun (TL-2026-7300, KQL) · unlock with TL Creds
- RubyGems Malicious Gem Post-Exploitation — pkg-runtime Persistence, authorized_keys Tampering, Wiper and Runner Memory Scrape (KQL) · unlock with TL Creds
- RubyGems Malicious Gem C2 and Exfiltration — [indicator], [indicator]/git-ecosystem, webhook.site Path and GitHub Token Polling (KQL) · unlock with TL Creds
- RubyGems Malicious Gem Install-Time Execution — extconf.rb Spawning Downloader/Bun (TL-2026-7300, Sigma) · unlock with TL Creds
- RubyGems Malicious Gem Post-Exploitation — pkg-runtime Persistence, authorized_keys Tampering, Wiper and Runner Memory Scrape (Sigma) · unlock with TL Creds
- RubyGems Malicious Gem C2 and Exfiltration — [indicator], [indicator]/git-ecosystem and knot-theory webhook.site Path (Sigma) · unlock with TL Creds
- RubyGems Malicious Gem Post-Exploitation — pkg-runtime Persistence, authorized_keys Tampering, Wiper and Runner Memory Scrape (SPL) · unlock with TL Creds
- RubyGems Malicious Gem C2 and Exfiltration — [indicator], [indicator]/git-ecosystem and knot-theory webhook.site Path (SPL) · unlock with TL Creds
Indicators of compromise
As of 2026-12-02, Threadlinqs Intelligence tracks 26 indicators of compromise for TL-2026-7300.
Sample indicators (3 of 26)
- Domain:
paleasbest[.]top - URL:
hxxps://webhook[.]site/49c21843-c27c-4a1b-b1f6-037c3998055f - File hash:
3b3f6e1bde0b28b015030a81a6d805b5b5306dc3f021e1102123971cfd83acc0
Defanged, TLP:CLEAR. Full set of 26 indicators: unlock with TL Creds.
Technical analysis
ReversingLabs' 2026 almanac (Lucija Valentić, 2026-12-02) consolidates several independent malicious-gem campaigns on RubyGems. They are not attributed to one operator; the only actor-level attribution in the sources is Socket's tie of the knot-theory gems to the GitHub account BufferZoneCorp.
strutil-core (RubyGems account jamnajiea): version 1.0.0 was published clean on 2026-11-01 02:19 UTC; malicious 1.0.1 followed at 04:05 UTC and was flagged by Socket's AI Scanner 70 seconds later. RubyGems removed both versions roughly five hours after the malicious release. A fake native-extension build script (ext/strutil-core/extconf.rb) downloads the Bun runtime (oven-sh/bun v1.2.18 from GitHub releases) and runs a multi-layer encrypted ~5.5 MB payload (index.js) at gem install / bundle install time, writing a no-op Makefile so installation appears to succeed. The payload exits on CIS-related locales, reads 51 credential stores (cloud, registry, Git, SSH, Docker, Kubernetes, Vault, password managers, wallets, AI-tool credentials such as .claude/.credentials.json and .codex/auth.json), enumerates AWS Secrets Manager/SSM, scrapes Runner.Worker memory on GitHub Actions via sudo-run Python, and tries (unsuccessfully per Socket) to interfere with StepSecurity Harden-Runner. Loot is encrypted with AES-256-GCM (key wrapped with RSA-OAEP-SHA256) and sent to https://paleasbest.top/v1/api, with GitHub/GitLab repositories as fallback. Persistence is a hourly Python backdoor (sync.py) under a systemd user service or LaunchAgent 'pkg-runtime' that reads a signed (RSA-PSS) URL from public GitHub commits containing the marker msync-3f7a. If a stolen GitHub token is found revoked, the net-health-checker monitor (polling api.github.com/user every 45 seconds) runs rm -rf ~/ and ~/Documents. The worm also modifies AI coding-tool and editor configuration (Claude, Cursor, Gemini, Aider, VS Code, MCP server 'workspace-tools', SessionStart hooks, CLAUDE.md/AGENTS.md) and contains RubyGems/npm/PyPI republishing, GitHub/GitLab and SSH spreading routines. Socket ties the code to the testmetest worm / Miasma family descended from the public Shai-Hulud toolkit; shared code does not identify a single operator. A related PyPI package, pystr-codec 0.1.0-0.1.2, uses the same C2 endpoint.
knot-theory 'Secret Snatchers' (Socket, 2026-05-01): 7 RubyGems and 9-10 Go modules under the knot-theory RubyGems and BufferZoneCorp GitHub accounts. Five gems were weaponized (knot-activesupport-logger, knot-devise-jwt-helper, knot-rack-session-store, knot-rails-assets-pipeline, knot-rspec-formatter-json); knot-date-utils-rb and knot-simple-formatter were dormant sleepers. Payloads in ext/extconf.rb harvest environment variables and credential files (~/.ssh keys, ~/.aws/credentials, ~/.npmrc, ~/.gem/credentials, ~/.netrc, gh hosts.yml) and post JSON to a webhook.site URL. The Go modules poison GitHub Actions by writing GOPROXY/GOSUMDB/GOFLAGS/GOMODCACHE to GITHUB_ENV, prepending a fake go wrapper via GITHUB_PATH, and appending an ed25519 key (deploy@buildserver) to authorized_keys.
GemStuffer (May 2026): Mend.io flagged 120+ malicious packages on 2026-05-11; RubyGems suspended new registrations 2026-05-12 to 2026-05-16. Packages were empty placeholders or scrapers of UK council websites; some probed RubyGems for XSS and similar flaws; RubyGems reported no evidence API-key theft succeeded. A September claim linking the activity to OpenAI agents is circumstantial.
Cryptojacking (mid-July, Unit 42 and Mend.io): trojanized copies of popular libraries with an advanced payload that delays execution by hours, persists, spreads over SSH, infects package.json, setup.py, Dockerfiles, git hooks and VS Code extensions and downloads XMRig; a simpler group of 23 mostly-typosquat gems fetches only the latest XMRig.
SleeperGem (July, Aikido/StepSecurity): git_credential_manager 2.8.0-2.8.3 (new malicious package) is a loader fetching payloads from the attacker-registered Forgejo namespace git.disroot.org/git-ecosystem with TLS verification disabled, executed via powershell -ExecutionPolicy bypass or /bin/sh; it skips CI environments (~30 CI env vars). From 2.8.2 it also runs on require. The hijacked Dendreo gem (dormant since 2020; two malicious versions published 2026-07-18, 1.1.4 per ReversingLabs) adds git_credential_manager as a dependency, and fastlane-plugin-run_tests_firebase_testlab (0.3.2, 574,661 downloads) was published by a different maintainer.
Bundle of Malware (mid-August, OpenSourceMalware): typosquats of bundler, i18n, activesupport and rake use extconf.rb to launch a runner that writes a dummy Makefile, downloads a Windows executable from GitHub, then a large Rust loader with an embedded stealer takes browser data, cookies, cards, wallets/seed phrases, Telegram data and system info, exfiltrating via a file-sharing service.
Registry abuse: Shai-Hulud's compromise of the GitHub Action @7nohe/openapi-react-query-codegen stole RubyGems credentials usable to republish poisoned gems; in June Mend.io found RubyGems packages used as a dead drop for a stolen 1Password vault (63 items).
MITRE ATT&CK techniques by tactic:
Credential Access
T1003.007 Proc Filesystem; T1528 Steal Application Access Token; T1552.001 Credentials In Files; T1555 Credentials from Password Stores
Defense Evasion
T1027 Obfuscated Files or Information; T1036.005 Match Legitimate Resource Name or Location; T1140 Deobfuscate/Decode Files or Information
Execution
T1059.004 Unix Shell; T1059.006 Python; T1059.007 JavaScript; T1204.002 Malicious File
Persistence
T1098.004 SSH Authorized Keys; T1543.001 Launch Agent; T1543.002 Systemd Service
Command and Control
Initial Access
T1195.001 Compromise Software Dependencies and Development Tools; T1195.002 Compromise Software Supply Chain
Impact
T1485 Data Destruction; T1496.001 Compute Hijacking
Privilege Escalation
T1548.003 Sudo and Sudo Caching
Exfiltration
T1567.001 Exfiltration to Code Repository
Discovery
T1614.001 System Language Discovery
defense-impairment
Remediation
Patches
- No vendor patch; malicious versions were removed from RubyGems. Pin to known-good versions and remove affected gems
Immediate actions
- Search Gemfile.lock, installed gems and CI caches for strutil-core 1.0.1, git_credential_manager 2.8.x, the five knot-* weaponized gems, and the Dendreo / fastlane-plugin-run_tests_firebase_testlab versions named in the reports
- Treat any host or CI runner that installed an affected gem as compromised and rotate all reachable cloud, CI, GitHub, npm, PyPI, RubyGems, SSH and AI-tool credentials
- Block paleasbest.top and git.disroot.org/git-ecosystem; alert on the specific webhook.site URL path rather than blocking the whole domain
- Hunt for pkg-runtime / net-health-checker systemd units or LaunchAgents, ~/.local/share/runtimes/sync.py, ~/.config/index.js, and unexpected authorized_keys entries (deploy@buildserver)
- Do not revoke a stolen GitHub token on an infected host before isolating it and backing up data: the strutil-core monitor wipes the home directory on 401/403
Workarounds
- Install gems with native-extension build scripts only in isolated, network-restricted sandboxes
- Block egress from build hosts to non-allowlisted domains
Longer-term hardening
- Review new versions of dormant gems and maintainer changes before upgrading
- Monitor dependencies at install time and post-install; inspect extconf.rb in gems with native extensions
- Pin dependencies, use a private gem mirror or cooldown period for new versions, and enforce MFA / trusted publishing for RubyGems, npm and PyPI
- Review committed AI-tool configs (.claude/settings.json, .cursor/mcp.json, .vscode/tasks.json, CLAUDE.md, AGENTS.md) for unexpected hooks or MCP servers
- Monitor CI logs for unexpected writes to GITHUB_ENV and GITHUB_PATH
Affected and fixed versions
- RubyGems — strutil-core
Vulnerable versions: 1.0.1
Fixed in: 1.0.0 (clean; also removed) - RubyGems — knot-theory gems (knot-activesupport-logger, knot-devise-jwt-helper, knot-rack-session-store, knot-rails-assets-pipeline, knot-rspec-formatter-json)
Vulnerable versions: all published versions - RubyGems — git_credential_manager
Vulnerable versions: 2.8.0; 2.8.1; 2.8.2; 2.8.3 - RubyGems — Dendreo
Vulnerable versions: 1.1.4 and one other version published 2026-07-18
Fixed in: pre-2026-07 releases - RubyGems — fastlane-plugin-run_tests_firebase_testlab
Vulnerable versions: 0.3.2
Timeline
- Socket publishes 'Secret Snatchers' report: 7 knot-theory RubyGems (5 weaponized) and Go modules from BufferZoneCorp steal secrets via extconf.rb and poison CI; RubyGems removes active gems
- Mend.io flags the first 120+ GemStuffer packages on RubyGems; the cluster keeps growing
- RubyGems suspends new account registrations in response to the GemStuffer flood
- RubyGems reopens new account registrations
- Two malicious versions of the long-dormant Dendreo gem are published (SleeperGem); git_credential_manager 2.8.0-2.8.3 and a new fastlane-plugin-run_tests_firebase_testlab version appear around the same time
- Unit 42 timely-threat-intel entry on the mid-July RubyGems cryptomining wave (trojanized libraries and 23 XMRig typosquats); Mend.io also reports
- Independent researchers publicly link GemStuffer activity to OpenAI AI agents; evidence is circumstantial
- pystr-codec 0.1.0-0.1.2 appear on PyPI using the same C2 endpoint later seen in strutil-core
- strutil-core 1.0.0 (clean) published 02:19 UTC; malicious 1.0.1 published 04:05 UTC; Socket AI Scanner flags it after 70 seconds; RubyGems removes both versions about five hours later
- ReversingLabs publishes the 2026 almanac of malicious RubyGems campaigns
Sources cited
- MAL-2026-19054 strutil-core (OSV) osv.dev · Advisory · 2026-11-01
- RubyGems status incident (GemStuffer registration suspension) status.rubygems.org · Advisory · 2026-05-12
- RubyGems Is No Longer Sitting Out: The 2026 Almanac of Malicious Gems (ReversingLabs) reversinglabs.com · Research · 2026-12-02
- Shai-Hulud Descendant Surfaces in Malicious Ruby Gem That Steals Credentials and Poisons AI Tools (Socket) socket.dev · Research · 2026-11-01
- Malicious Ruby Gems and Go Modules Steal Secrets, Poison CI (Socket) socket.dev · Research · 2026-05-01
- SleeperGem: RubyGems supply chain attack (Aikido) aikido.dev · Research
- SleeperGem: Compromised RubyGems Drop Persistent Backdoor (StepSecurity) stepsecurity.io · Research
- GemStuffer (Socket) socket.dev · Research
- Inside the RubyGems Supply Chain Attack (Mend.io) mend.io · Research
- RubyGems Cryptomining Campaign (Mend.io) mend.io · Research
- RubyGems as a dead drop for stolen data (Mend.io) mend.io · Research
- strutil-core package analysis (ReversingLabs Spectra Assure) secure.software · Research
- Unit 42 Timely Threat Intel (RubyGems cryptomining entry) GitHub · Code repository · 2026-07-22
Further reading
AI-drafted from 13 cited sources; published ; last updated —.