Security & Trust

Miasma Worm Hit 73 Microsoft Repos. The Target Was AI Coding Agents.

Malicious config files planted in Azure repos harvest credentials when opened in AI coding agents. 105-second sweep.

· 5 min read
Share on X LinkedIn
Miasma Worm Hit 73 Microsoft Repos. The Target Was AI Coding Agents.

From Open Source to Microsoft in One Hop

The Miasma supply chain worm, which first surfaced in Red Hat npm packages and then spread to 57 additional packages with 647,000 monthly downloads, escalated in June 2026 to a new target class: Microsoft's own GitHub infrastructure. A recompromised contributor account — an individual who had legitimate commit access to Azure repositories — pushed malicious commits into Azure's durabletask repository, a core component of Azure's Durable Functions framework.

The compromised commits did not modify application code. They planted configuration files — .cursorrules, .claude directory structures, VS Code workspace settings — designed to execute credential-harvesting payloads when the repository is opened in an AI coding agent or an IDE with AI integration. The attack targets the moment a developer or an automated agent clones the repository and opens it in their development environment.

73
Microsoft repos disabled
Across Azure, Azure-Samples, Microsoft, and MicrosoftDocs organizations. Source: StepSecurity (June 2026)
4
Microsoft organizations affected
Azure, Azure-Samples, Microsoft, MicrosoftDocs. Source: StepSecurity (June 2026)

AI Agent Config Files as Attack Vectors

The Miasma worm's strategy against Microsoft reveals a new supply chain attack pattern: targeting the configuration files that AI coding agents read on startup. When Claude Code opens a repository, it reads .claude/settings.json and CLAUDE.md. When Cursor opens a repository, it reads .cursorrules. When Gemini CLI initializes, it reads similar configuration files. These files can contain instructions, tool configurations, and in some cases, executable hooks.

By planting malicious configuration files in trusted Microsoft repositories, the Miasma worm created a payload delivery mechanism that activates not when code is compiled or executed, but when a repository is merely opened. The distinction matters. Code review catches malicious application code. Configuration files in trusted repositories receive less scrutiny — they are expected to be there, and their contents are often treated as non-executable.

105 seconds
GitHub automated response
Time from detection to disabling all 73 repositories. Source: StepSecurity (June 2026)

The Broader Shai-Hulud Campaign

The Microsoft compromise is one front in the larger Shai-Hulud campaign, which has distributed 300+ malicious package versions across 57 npm packages. The campaign operates through recompromised contributor accounts — individuals whose credentials were previously stolen and who have since regained access but whose tokens or session cookies remain in circulation. The worm reactivates dormant access rather than creating new accounts.

GitHub's automated enforcement systems detected the malicious commits and disabled all 73 affected repositories in a 105-second sweep. The speed of the response reflects improvements in GitHub's automated malware detection. But the 105-second window still represents a period during which any developer or AI agent that cloned one of the affected repositories would have received the malicious configuration files.

57 npm packages, 300+ malicious versions
Shai-Hulud campaign scope
Self-propagating worm targeting contributor accounts. Source: SecurityWeek (June 2026)

What This Means for Enterprise Development

The compromise of Microsoft's own repositories demonstrates that organizational trust is not repository trust. Microsoft maintains thousands of GitHub repositories with hundreds of contributors. Each contributor account is an entry point. Each configuration file is a potential payload container. The Miasma worm found one account, planted files in one repository, and the blast radius extended to 73 repositories across four organizations before automated systems intervened.

For organizations using AI coding agents in development workflows, the Miasma campaign establishes that repository configuration files are a security-critical surface. Agent configuration should be verified against known-good baselines before execution. Repositories from trusted organizations still require integrity checks on configuration files — particularly files that AI agents process automatically on initialization.

Share this insight
More insights