Skip to main content
300 Repositories Poisoned: The GlassWorm TakedownIncident
5 min readFor Security Engineers

300 Repositories Poisoned: The GlassWorm Takedown

What Happened

GlassWorm infected developer workstations through malicious packages and browser extensions, using stolen credentials to poison over 300 GitHub repositories. The malware compromised developer accounts and injected malicious code into legitimate projects. CrowdStrike, Google, and the Shadowserver Foundation coordinated to dismantle its command-and-control infrastructure in early 2025.

The attack targeted developers because a single compromised workstation grants attackers write access to multiple repositories, CI/CD pipelines, and internal systems. Once GlassWorm stole credentials, it automated backdoor injections into repositories the developer accessed, turning trusted maintainers into unwitting distribution channels.

Timeline

Initial Compromise Phase: GlassWorm spread through typosquatted packages in public registries and malicious browser extensions marketed to developers. The malware installed quietly on developer workstations without triggering detection.

Credential Harvesting: Once installed, GlassWorm exfiltrated SSH keys, API tokens, and session cookies for GitHub, GitLab, npm, and PyPI. It targeted credential stores used by Git clients and package managers.

Repository Poisoning: Using stolen credentials, the malware automated commits to repositories, injecting malicious code into dependency files, build scripts, and CI/CD configurations. The 300+ poisoned repositories then distributed the malware to downstream users.

C2 Resilience: GlassWorm maintained four distinct command-and-control channels—blockchain-based messaging, peer-to-peer networks, compromised WordPress sites, and traditional HTTP callbacks. This redundancy meant taking down one channel didn't disable the botnet.

Coordinated Takedown: The joint operation disrupted the C2 infrastructure, but the poisoned repositories required manual remediation by affected maintainers.

Which Controls Failed or Were Missing

Workstation Security: Developer machines lacked application allowlisting or runtime monitoring that would have flagged the malware's credential access patterns. Many organizations exempt developer workstations from strict endpoint controls, creating a security gap.

Credential Management: Developers stored long-lived credentials in default locations without hardware token protection. The malware found plaintext SSH keys in ~/.ssh/ and API tokens in configuration files. No credential rotation policies limited the window of compromise.

Code Review Bypass: The automated commits from compromised accounts bypassed code review requirements. Repository settings allowed direct commits to main branches or had approval requirements that trusted any commit from a maintainer account.

Dependency Verification: Downstream users installed packages without verifying signatures or checksums. No controls prevented execution of code from newly-added dependencies, even when those dependencies appeared in unusual commits.

Network Monitoring: The four C2 channels—especially blockchain and P2P communications—went undetected because network monitoring focused on traditional HTTP callbacks to known-bad domains. Legitimate services hosting C2 messages blended with normal developer traffic.

What the Standards Require

PCI DSS v4.0.1 Requirement 6.3.2 mandates that bespoke and custom software is developed securely, including using secure coding techniques to prevent common coding vulnerabilities. This extends to your development environment—you can't write secure code from a compromised workstation.

Requirement 8.3.2 requires multi-factor authentication for all access to the cardholder data environment. Developer credentials that access production systems or code repositories fall under this requirement. Hardware tokens would have prevented credential theft even if the workstation was compromised.

NIST 800-53 Rev 5 Control SA-10 (Developer Configuration Management) requires organizations to perform configuration management during system development. This includes controlling changes to repositories and ensuring that code commits come from authenticated, authorized developers—not just accounts that appear legitimate.

ISO 27001 Control 8.32 (Change Management) requires that changes to information processing facilities and systems are subject to change management procedures. Automated commits from compromised credentials violate this control because no human reviewed the changes.

SOC 2 Type II CC6.8 states that the entity implements controls to prevent or detect and act upon the introduction of unauthorized or malicious software. This applies to developer workstations, which often process and store sensitive data despite being excluded from standard security controls.

Lessons and Action Items for Your Team

Protect Developer Credentials Now

Move all developer authentication to hardware tokens. YubiKeys or similar FIDO2 devices cost $50 per developer—less than one hour of incident response time. Configure GitHub, GitLab, and cloud providers to require hardware token authentication for all write access. Disable password-based authentication entirely.

Rotate all API tokens quarterly and audit which tokens have write access to production systems. Implement short-lived tokens (4-hour maximum) for CI/CD pipelines using workload identity federation instead of static credentials.

Enforce Commit Verification

Require GPG-signed commits for all repositories. Configure branch protection rules to reject unsigned commits, even from maintainers. This creates an audit trail that ties commits to specific hardware tokens, making automated poisoning detectable.

Set up GitHub's push protection to scan for exposed secrets before commits reach the repository. This catches credentials that would enable lateral movement.

Lock Down Developer Workstations

Deploy EDR on every developer machine with behavioral monitoring enabled. Configure alerts for credential access patterns: any process reading multiple SSH keys or API token files within a short window should trigger investigation.

Implement application allowlisting for package manager executables. Developers need npm, pip, and cargo—they don't need those tools to spawn child processes that access credential stores.

Monitor Unusual C2 Patterns

GlassWorm's use of blockchain and P2P networks as C2 channels bypassed domain-based blocking. Implement network behavior analytics that flag workstations making blockchain RPC calls or joining P2P networks when those protocols aren't part of your development stack.

Create firewall rules that require explicit justification for developer workstations to access cryptocurrency nodes or DHT networks. Most development work doesn't require these protocols.

Audit Repository Access Weekly

Generate reports of all accounts with write access to critical repositories. Flag accounts that haven't committed in 90 days but still have permissions. Review all commits made outside normal working hours for the account's time zone.

Implement CODEOWNERS files that require approval from multiple maintainers for changes to dependency manifests, CI/CD configurations, and build scripts—the exact files GlassWorm targeted.

Test Your Supply Chain Response

Run a tabletop exercise: "A maintainer's account commits malicious code to your most-used internal library at 3 AM. How long until you detect it? Who has authority to force-push a revert? How do you notify downstream teams?" Map the gaps in your current runbooks before you're doing this during an active incident.

The GlassWorm takedown stopped the C2 infrastructure, but the poisoned repositories remain a cleanup problem for every affected organization. Your goal is to ensure a compromised developer account can't silently poison your supply chain in the first place.

Topics:Incident

You Might Also Like