A coordinated software supply chain attack, dubbed SleeperGem, has compromised the RubyGems package registry. Uncovered between July 18 and July 19, 2026, the campaign involved threat actors hijacking long-dormant maintainer accounts to publish malicious versions of legitimate packages. The primary goal was to install a persistent, multi-stage backdoor onto developer workstations. The attack leveraged a malicious dependency, git_credential_manager, which was added to popular gems, including one with over 574,000 downloads, significantly amplifying its reach. This incident highlights the growing threat of account takeovers in open-source registries as a vector for widespread compromise.
The SleeperGem attack centered on the hijacking of inactive developer accounts on RubyGems, a common repository for Ruby software packages. The attackers used this access to publish trojanized updates to several gems.
git_credential_manager was created to impersonate the legitimate Microsoft Git Credential Manager. This package was the primary malware delivery vehicle.git_credential_manager as a dependency:Dendreo (versions 1.1.3, 1.1.4)fastlane-plugin-run_tests_firebase_testlab (version 0.3.2), a package with over 574,000 total downloads.This dependency confusion technique caused developers who updated or installed the compromised gems to unknowingly pull in the malicious code. The updates were pushed directly to the registry without corresponding source code commits, making the changes harder to spot.
The attack unfolded in multiple stages, demonstrating increasing sophistication.
T1195.001 - Compromise Software Dependencies and Development Tools).git_credential_manager gem acted as a first-stage dropper. Early versions fetched a second-stage payload from an attacker-controlled Forgejo (a Git service) host. Later versions embedded the execution logic directly, triggered by a simple require statement.T1480.001 - Virtualization/Sandbox Evasion: System Checks).systemd services and cron jobs (T1543.002 - Create or Modify System Process: Systemd Service, T1547.006 - Boot or Logon Autostart Execution: Cron). It also attempted to escalate privileges by installing a setuid root shell at /usr/local/sbin/ping6, giving the attacker persistent root access (T1548.003 - SUID and SGID).Any developer machine that installed the malicious versions of the affected gems should be considered fully compromised. The impact is severe:
git_credential_managerDendreofastlane-plugin-run_tests_firebase_testlabSecurity teams and developers should hunt for the following activity:
/usr/local/sbin/ping6setuid bit enabled.systemd user servicessystemd services in user directories (~/.config/systemd/user/).cron logscron logs for the creation of new, unexpected cron jobs.gem install git_credential_managerGemfile.lock for the presence of the malicious packages and versions. Immediately remove them if found.setuid binary.Gemfile.lock to ensure repeatable builds and prevent unexpected updates to dependencies. This is a form of D3FEND's D3-ACH: Application Configuration Hardening.D3-MFA: Multi-factor Authentication.Using dependency lockfiles (e.g., Gemfile.lock) to pin package versions prevents the automatic installation of newly published malicious versions.
Mapped D3FEND Techniques:
Package maintainers should enable MFA on their registry accounts to prevent takeovers, which was the root cause of this attack.
Mapped D3FEND Techniques:
Auditing developer endpoints for signs of compromise, such as unexpected cron jobs or systemd services, is crucial for detection.
Mapped D3FEND Techniques:
Enforcing the principle of least privilege on developer machines limits the ability of malware to gain persistence or escalate privileges.
Mapped D3FEND Techniques:
Enforce the use of dependency lockfiles (Gemfile.lock in the Ruby ecosystem) across all development projects. This is a critical configuration hardening step that pins the exact versions of all dependencies. By doing so, running a package installation command like bundle install will only install the specific, vetted versions listed in the lockfile. This prevents the build system from automatically fetching a newer, potentially malicious version of a dependency like fastlane-plugin-run_tests_firebase_testlab:0.3.2. CI/CD pipelines should be configured to use the --frozen or --deployment flag, which causes the build to fail if the Gemfile.lock is out of sync, ensuring that only explicitly approved package versions are ever used in automated builds.
Integrate dynamic analysis or sandboxing into the CI/CD pipeline for testing new or updated dependencies before they are approved for developer use. When a developer proposes adding or updating a gem, the pipeline should automatically pull the package into an isolated sandbox environment. In this environment, the tool would install the gem and monitor its behavior during execution. For the SleeperGem attack, this sandbox would detect suspicious activities like network callouts to an unknown Forgejo host, attempts to write to system directories like /usr/local/sbin/, or attempts to create systemd or cron persistence mechanisms. This provides a behavioral safety net to catch malicious packages that pass static analysis, especially those with evasive logic.
Organizations that maintain open-source packages must enforce a mandatory policy for all maintainers to enable multi-factor authentication (MFA) on their RubyGems, GitHub, and other registry accounts. The root cause of the SleeperGem attack was the takeover of dormant accounts that were likely protected only by a password. By requiring a second factor (e.g., TOTP app, security key), the risk of account hijacking is dramatically reduced. Organizations can use tools to audit their developers' account security settings on public platforms and enforce this policy through internal guidelines and regular checks. This shifts the defense 'left' to prevent the initial compromise of the supply chain itself.
The SleeperGem supply chain attack was first uncovered.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.