
Miasma Worm
A Self-Replicating Supply Chain Attack Hijacks AI Coding Agents to Compromise 73 Microsoft GitHub Repositories
On June 5, 2026, the self-replicating Miasma worm compromised 73 Microsoft repositories across four GitHub organizations - Azure, Azure-Samples, Microsoft, and MicrosoftDocs - including Azure/functions-action, the official GitHub Action used to deploy Azure Functions.
- 01TRIGGEROn June 5, 2026, the self-replicating Miasma worm compromised 73 Microsoft repositories across four GitHub…
- 02MACHINE ACTIONAutonomous actor
- 03MISSING GATETrust boundaries, least privilege, and output approval
- 04IMPACTData security
The short version
On June 5, 2026, the self-replicating Miasma worm compromised 73 Microsoft repositories across four GitHub organizations - Azure, Azure-Samples, Microsoft, and MicrosoftDocs - including Azure/functions-action, the official GitHub Action used to deploy Azure Functions.
Case telemetry
- INCIDENT
- SS-IR-085
- DATE
- June 5, 2026
- SYSTEM
- Miasma Worm
- LOCATION / SCOPE
- Microsoft GitHub organizations
- EVIDENCE
- Reported
- AI ROLE
- Autonomous actor
- HARM
- Data security
- SOURCES
- 2 cited records
The event
On June 5, 2026, the self-replicating Miasma worm compromised 73 Microsoft repositories across four GitHub organizations - Azure, Azure-Samples, Microsoft, and MicrosoftDocs - including Azure/functions-action, the official GitHub Action used to deploy Azure Functions. Using a previously compromised contributor account, the attacker pushed a malicious commit to Azure/durabletask that planted a set of configuration files and a 4.6 MB obfuscated payload (setup.js). The files were wired to execute automatically the moment the repository was opened in a developer's AI coding tool. GitHub's automated abuse detection disabled all 73 repositories in a two-wave takedown spanning 105 seconds. The breach was the third escalation of a campaign that began June 1 with 32 poisoned @redhat-cloud-services npm packages and widened on June 3 to 57 more across the npm registry.
What the machine did
The worm did not exploit a software bug - it weaponized the automation built into AI coding assistants. A .claude/settings.json file embedded a Claude Code SessionStart hook, and a matching .gemini/settings.json hooked Gemini CLI, each running "node .github/setup.js" the instant a coding session started. A .cursor/rules/setup.mdc file used prompt injection with "alwaysApply: true" to instruct Cursor's agent to run the payload as a mandatory setup step, while a .vscode/tasks.json task fired on "folderOpen" with no user action at all. No human reviewed or approved any of this: simply opening the repository in an agent was enough to harvest credentials for AWS, Azure, GCP, Kubernetes and 90+ developer tools, then reuse the stolen GitHub tokens to propagate to the next repository.
Where the failure landed
Miasma is among the first self-replicating worms documented to spread specifically by hijacking AI coding agents, turning "open a repo" into a live security boundary. It harvested cloud and developer credentials at scale, republished npm packages, and forced the takedown of critical Microsoft infrastructure including the official Azure Functions deployment action. Researchers linked it to the earlier Mini Shai-Hulud worm from the threat group TeamPCP, with the same compromised account reused across the May PyPI attack and the June GitHub incident - evidence of a campaign evolving its techniques daily and treating autonomous developer tooling as its primary propagation engine.
Reported
Documented in the cited public record. Follow the sources for the precise evidentiary posture.
SOURCE RECORD UPDATED 2026-07-09
2 cited records
- 01Secondary / analysisThe Hacker News: Miasma Worm Hits 73 Microsoft GitHub Repositories (June 2026)
- 02Primary / officialStepSecurity (June 2026)
Trust boundaries, least privilege, and output approval
The failure pattern in this case: Untrusted input crossed a privileged boundary.
The moment the path could change
A security owner approves credential scope and externally visible actions before the agent can cross a trust boundary.
Autonomy is a design choice.
See the operating model that keeps AI useful while preserving human authority at consequential moments.
Compare AgenticAI and AugmentedAI →