ghtier

These write-ups are not threat intelligence and are not kept up to date as an incident develops. They are here to show how each attack worked, so you can find and fix the same techniques in your own setup. For the latest on an incident, read its sources.

← All incidents

Megalodon: mass backdooring of CI workflows

May 2026 · Contained

On 18 May 2026, probably with credentials taken from developers' machines by infostealers, someone pushed workflows that steal CI secrets and cloud credentials straight to the default branch of 5,561 repositories in about six hours, and left dormant workflow_dispatch backdoors in a few chosen ones.

Access held
Scale
5,718 commits to 5,561 repositories in about six hours
Full summary

Between about 11:36 and 17:48 UTC on 18 May 2026, 5,718 commits landed on the default branches of 5,561 public repositories, with no pull request. Git lets the pusher write any author, so the commits claimed to come from build-bot, auto-ci, ci-bot or pipeline-bot and said things like "ci: add build optimization step". SafeDep and Wiz read the pushes as made with compromised personal access tokens or deploy keys, and Hudson Rock found 331 of the 978 usernames involved in infostealer logs; how the credentials were taken is otherwise not established. Most repositories got a new .github/workflows/ci.yml named SysDiag that ran on every push and on pull_request_target, asked for id-token: write, and ran a base64-encoded bash script. The script collected environment variables, credential files, cloud keys from the AWS, GCP and Azure metadata services, secrets found in the workspace and the job's OIDC token request values, and posted them to 216.126.225.129:8443. In a smaller set, including nine Tiledesk repositories and eight of Black-Iron-Project, an existing workflow was replaced by one named Optimize-Build with the same script but only a workflow_dispatch trigger, so it did nothing until someone ran it. SafeDep found the campaign because Tiledesk's maintainer, without noticing, published seven npm versions from the poisoned repository; the npm account itself was not touched.

How it unfolded

Pick a step to zoom into it. A dashed line is a step the sources do not state. Blue dots are the checklist items that break the step.

Whole path

Leaked tokenway inWorkflows: WriteStolen PATs or deploy keysPush directly, withoutreviewtechniqueChange a workflow, get itssecretsescalationOIDC ID token: WriteSysDiag job's OIDC tokenCI secrets and cloud keysRunner env, files, IMDSLeave a dormant workflowbehindtechniqueKeep access

The whole attack, one row per step. Pick a step on the left, or click a box in its row.

Frameworks

Part of

Contained. First seen May 2026. How the attacker got in is not confirmed. 5,718 commits to 5,561 repositories in about six hours (as of 21 May 2026, source). Mapping by ghtier, not yet reviewed. Threat landscape

Sources

Reported by: SafeDep, StepSecurity