A large-scale, automated supply chain attack campaign named "Megalodon" has compromised the CI/CD pipelines of over 5,500 public GitHub repositories. In a rapid-fire assault lasting only six hours, the attackers pushed 5,718 malicious commits to 5,561 unique repositories. These commits were designed to modify CI/CD workflow files (e.g., GitHub Actions), injecting malicious steps into the automated build and deployment processes. The initial access vector for this widespread attack was the use of developer credentials harvested by information-stealing malware. This incident demonstrates a significant evolution in supply chain attacks, moving towards highly automated, broad-spectrum campaigns that leverage previously compromised developer accounts at scale. It underscores the critical risk posed by infostealer malware to the entire software development ecosystem.
The "Megalodon" campaign is characterized by its speed and scale. The threat actor automated the process of using stolen GitHub credentials to push malicious code. The core of the attack was not to poison a single popular library, but to backdoor the build process of thousands of individual projects simultaneously.
.github/workflows/*.yml). The specific payload of these malicious workflows was not detailed in the articles, but such attacks typically aim to steal secrets (like GITHUB_TOKEN, AWS_ACCESS_KEY_ID) from the build environment and exfiltrate them to an attacker-controlled server.The attack follows a clear, repeatable pattern that is ideal for automation:
curl or wget) that sends all environment variables—which often contain sensitive secrets—to the attacker's server.T1078 - Valid Accounts: The entire campaign is predicated on the use of legitimate, stolen developer accounts.T1195.001 - Compromise Software Dependencies and Development Tools: By modifying CI/CD workflows, the attacker compromises the development toolchain.T1552.006 - Group Policy Preferences: While this is specific to Windows, the concept of modifying configuration files (CI/CD workflows) to steal credentials is the same.T1059.004 - Unix Shell: The malicious workflow steps likely use basic shell commands to exfiltrate data.T1500 - Compile After Delivery: The malicious code is not executed until the CI/CD pipeline compiles or runs the project.The "Megalodon" campaign represents a shift from targeted supply chain attacks to a high-volume, opportunistic model.
No specific IOCs such as commit hashes, attacker domains, or IP addresses were provided in the source articles.
.github/workflows/ directory. Enable GitHub's push protection and secret scanning features. Monitor account security logs for logins from unusual IP addresses or locations. Use EDR on developer machines to detect the presence of infostealer malware.Enforcing MFA on all developer accounts is the most effective control to prevent the use of stolen passwords.
Deploy EDR/AV solutions on developer endpoints to detect and block the infostealer malware that harvests credentials in the first place.
Regularly audit repository commits and CI/CD workflow files for unauthorized or suspicious changes.
Apply the principle of least privilege to CI/CD environments, ensuring they only have access to the secrets necessary for their function.
Multi-factor Authentication is the single most effective countermeasure against the 'Megalodon' attack. The entire campaign relied on the usability of stolen passwords. Had the targeted developer accounts on GitHub been protected by MFA (using an authenticator app, security key, or biometrics), the attackers' automated scripts would have failed at the login stage. The stolen passwords alone would be insufficient to gain access and push malicious commits. Organizations must enforce mandatory MFA for all developers on code hosting platforms like GitHub, GitLab, and Bitbucket. This simple, widely available control acts as a powerful barrier, effectively neutralizing the primary vector of this large-scale automated attack and protecting the integrity of the CI/CD pipeline.
To stop attacks like 'Megalodon' at the source, Process Analysis on developer endpoints is crucial. The credentials were stolen by infostealer malware running on developers' machines. An Endpoint Detection and Response (EDR) solution should be deployed to monitor for the tell-tale signs of infostealers. This includes processes that attempt to access browser credential stores (e.g., Chrome's 'Login Data' file), enumerate environment variables, or scan the filesystem for files named credentials, .ssh, or wallet.dat. By detecting and terminating these malicious processes before they can exfiltrate their findings, the organization prevents the credential theft that fuels these large-scale supply chain attacks. This proactive endpoint defense is essential for protecting the 'first mile' of the software supply chain.
Applying the principle of Domain Account Monitoring to GitHub accounts provides a critical detection layer. Security teams should ingest GitHub audit logs into their SIEM and create rules to detect anomalous behavior. For the 'Megalodon' attack, a key indicator would be a developer account suddenly pushing code from a new or suspicious IP address, especially one belonging to a VPN or hosting provider commonly used by threat actors. Another rule could flag accounts that have been dormant for a long period and suddenly become active. Correlating GitHub usernames with data from infostealer breach corpuses (as Hudson Rock did) can also create a high-confidence watchlist of accounts to monitor closely. This continuous monitoring can identify a compromised developer account before it's used to inject malicious code into a CI/CD pipeline.
The 'Megalodon' campaign compromises over 5,500 GitHub repositories within a six-hour window.
Hudson Rock publishes analysis linking the attack to credentials stolen by infostealer malware.

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.
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.