Sophia
Hart

SleeperGem RubyGems Attack Targets Developer Machines and Software Supply Chains

Sophia Hart

Jul 23, 2026

5 min read

rubygems malware

TL; DR

  • SleeperGem abused three malicious RubyGems packages that delivered second-stage payloads through an attacker-controlled Forgejo host targeting developer workstations.
  • The malware checks for CI/CD environment variables, exits when they are detected, and instead executes on developer workstations.
  • Once executed, it downloads additional payloads, establishes persistence, probes privileged groups, and attempts root-level persistence when conditions allow.
  • Organizations should investigate affected endpoints, remove persistence, rotate exposed secrets, and strengthen developer endpoint security against supply chain attacks.

A newly discovered RubyGems malware campaign, dubbed SleeperGem, demonstrates how attackers can target developer workstations by deliberately avoiding CI/CD environments.

Researchers found three malicious RubyGems packages that skip execution in CI/CD environments and instead run on developer workstations, where source code, package registry tokens, SSH keys, and cloud credentials are commonly stored.

The campaign demonstrates that developer endpoint security is becoming just as important as securing the software delivery pipeline.

Detect and contain threats using Hexnode XDR

Why security teams are paying attention

SleeperGem skips execution in CI environments and instead runs on developer workstations. According to StepSecurity, the malicious packages check for environment variables associated with GitHub Actions, GitLab CI, Jenkins, CircleCI, Travis CI, Vercel, and other build systems. If detected, the malware exits.

Developer systems often have access to source code, repositories, deployment environments, and enterprise resources. Although public reporting has not confirmed credential theft, StepSecurity recommends treating affected systems and accessible secrets as potentially compromised.

Why CI security alone isn’t enough

SleeperGem skips execution in CI/CD environments, reducing the effectiveness of security controls focused solely on build pipelines. Instead, it executes on developer workstations, where source code, package registry tokens, deployment tools, SSH keys, and cloud credentials are often available.

This highlights the need to extend developer endpoint security beyond CI/CD infrastructure. Monitoring developer workstations alongside build systems provides broader visibility into software supply chain attacks that evade automated build pipelines.

How the RubyGems Malware operates

The campaign involved three malicious packages:

  • git_credential_manager (versions 2.8.0–2.8.3), impersonating Microsoft’s Git Credential Manager
  • Dendreo (versions 1.1.3 and 1.1.4)
  • fastlane-plugin-run_tests_firebase_testlab (version 0.3.2)

According to StepSecurity, each package acts as a loader that retrieves a second-stage payload from an attacker-controlled Forgejo host. On Unix systems, the payload executes through /bin/sh.

Once active, the malware downloads additional scripts and binaries, installs persistence through cron jobs and systemd user services, checks membership in privileged groups, and attempts root-level persistence when passwordless sudo is available.

Attack Stage Observed Behavior Operational Impact
Package installation Malicious RubyGem executes loader Initiates malicious code execution on a developer workstation
Environment checks Skips execution in CI/CD environments Focuses on developer workstations
Second stage Retrieves payloads from an attacker-controlled Forgejo host Enables execution of second-stage payloads
Persistence Creates cron jobs and systemd user services Maintains persistence across sessions
Privilege checks Checks privileged groups and passwordless sudo Increases risk on misconfigured systems

StepSecurity also found that Dendreo and fastlane-plugin-run_tests_firebase_testlab published malicious releases after years of dormancy, increasing the likelihood that existing users would trust the updates.

This tactic demonstrates how attackers can exploit established package reputations as part of a software supply chain attack.

What security teams should verify

Organizations should identify whether affected package versions were installed on developer systems and check for persistence artifacts.

StepSecurity recommends treating affected machines as compromised, removing the dropped daemon and persistence mechanisms, checking for the setuid shell at /usr/local/sbin/ping6, and rotating credentials or secrets accessible from those devices.

Security teams should also:

  • Review newly published versions of dormant packages before deployment.
  • Validate package releases against upstream source repositories.
  • Maintain approved software baselines for developer endpoints.
  • Continuously monitor developer workstations alongside CI/CD infrastructure.

How Hexnode supports developer endpoint security

SleeperGem reinforces the need to treat developer workstations as critical enterprise assets. While package validation and dependency management remain essential, endpoint management and visibility add another layer of defense.

Hexnode UEM can help by:

  • Enforcing device compliance policies.
  • Maintaining approved software configurations.
  • Deploying operating system and security updates.
  • Providing centralized visibility into managed endpoints.

Where deployed, Hexnode XDR can complement incident response by:

  • Investigating endpoint activity and suspicious behavior on managed Windows and macOS endpoints through Hexnode XDR’s Investigate workspace.
  • Helping security teams analyze endpoint activity, identify suspicious patterns, and correlate telemetry during investigations.

Together, these capabilities support a layered response alongside dependency management, vulnerability remediation, and credential rotation.

cybersecurity kit
Featured resource

Cybersecurity kit

Build a stronger cybersecurity strategy with practical frameworks, checklists, templates, and enterprise security implementation guides.

DOWNLOAD

Conclusion

The RubyGems malware campaign demonstrates how software supply chain attacks can target developer endpoints instead of build infrastructure alone. By avoiding CI environments and executing on developer workstations, SleeperGem shifts attention to systems that often provide privileged access across the enterprise.

Organizations should extend software supply chain defenses beyond dependency scanning by securing developer devices, investigating unexpected package activity, and responding quickly when compromised packages are identified.

FAQs

The malware checks for CI/CD environment variables and exits when detected, executing on developer workstations instead of automated build systems.

Dormant packages can retain developer trust for years. Unexpected updates should be verified before deployment to reduce software supply chain risk.

Validate releases against upstream repositories, review dormant package updates, maintain approved software baselines, and continuously monitor developer workstations for unusual activity.

Share

Sophia Hart

A storyteller for practical people. Breaks down complicated topics into steps, trade-offs, and clear next actions—without the buzzword fog. Known to replace fluff with facts, sharpen the message, and keep things readable—politely.