Editor’s Note: A self-replicating worm has turned the AI coding assistant into a delivery mechanism, and the same campaign just forced one of the larger takedowns the open-source supply chain has seen. On June 5, GitHub disabled 73 Microsoft repositories after the Miasma campaign re-compromised Azure’s durabletask project, per OpenSourceMalware. In separate source-repository compromises, researchers at SafeDep documented Miasma planting payloads that fire when a developer opens an affected project in Claude Code, Cursor, Gemini CLI or VS Code.

For security, privacy, compliance, and eDiscovery professionals, this is a governance problem wearing a malware costume. Stolen cloud keys and GitHub secrets feed breach response, regulatory notification, and source-code-theft litigation. The artifacts that matter, developer workstations, build logs, and AI-agent configuration files, sit outside most preservation maps. When a worm exploits the trust model rather than a software flaw, vendor diligence and software bill of materials review move from paperwork to defense.

Watch the next wave. The operators are mutating descriptions and execution paths daily, and the AI-agent trigger is a template other actors will copy. Track node-gyp behavior, scope your tokens, and assume the developer environment is now in scope for both attackers and discovery.


Content Assessment: When the worm targets the assistant: Miasma turns AI coding agents into the trigger

Information - 93%
Insight - 91%
Relevance - 90%
Objectivity - 90%
Authority - 88%

90%

Excellent

A short percentage-based assessment of the qualitative benefit expressed as a percentage of positive reception of the recent article from ComplexDiscovery OÜ titled, "When the worm targets the assistant: Miasma turns AI coding agents into the trigger."


Industry News – Cybersecurity Beat

When the worm targets the assistant: Miasma turns AI coding agents into the trigger

ComplexDiscovery Staff

GitHub disabled 73 repositories across four Microsoft organizations on June 5 after the self-replicating supply-chain campaign known as Miasma re-compromised Azure’s durabletask project, according to the research group OpenSourceMalware. It was the most visible strike yet in a campaign whose signature technique points somewhere uncomfortable.

That technique waits for a developer to open a project in an AI coding assistant. Security researchers have documented Miasma planting code in source repositories that detonates inside tools such as Claude Code, Cursor and Gemini CLI, though whether the disabled Microsoft repositories carried that specific payload is not established in the public record. What is clear is the chain that led here, and it runs through three distinct waves.

The shutdown notice itself was blunt. “Access to this repository has been disabled by GitHub Staff due to a violation of GitHub’s terms of service,” read the banner on Azure/azure-functions-host and dozens of sibling projects, per OpenSourceMalware’s June 5 writeup. The disabled repositories spanned Azure, Azure-Samples, Microsoft and MicrosoftDocs, and they took the entire Durable Task family down with them: the .NET, Go, Java, JavaScript and MSSQL implementations all went dark at once.

The Red Hat packages came first

The campaign surfaced on the npm registry. On June 1, Miasma compromised 32 packages under the @redhat-cloud-services namespace, spanning over 90 versions, according to the Microsoft Defender Security Research Team, which published the first detailed teardown on June 2. The malicious code stole credentials from continuous-integration environments and developer machines, then republished trusted packages to spread, the team said. This first wave abused npm trusted publishing and maintainer trust, not any flaw in the registry itself.

Then came Phantom Gyp

Two days later the worm changed its entry point. Rather than the preinstall or postinstall lifecycle scripts that security tooling typically monitors, it began abusing a 157-byte binding.gyp file, a configuration artifact npm associates with native C and C++ add-ons. When npm sees that file during installation, it runs node-gyp rebuild automatically, and the worm rides that legitimate behavior into the environment. Researchers at StepSecurity named the technique “Phantom Gyp.”

That June 3 wave struck @vapi-ai/server-sdk, the official Vapi.ai voice server kit that npm metrics put above 408,000 downloads a month, then spread within an hour to dozens of packages tied to the same maintainer. By the close of that day, researchers at Semgrep counted 57 compromised packages across 286 malicious versions.

And then the source repositories

The third wave skipped the registry entirely, and it is where the AI-agent trigger appears. Examining a compromise of the icflorescu/mantine-datatable project and four related repositories, SafeDep found a commit that “added no dependencies” but “planted a 4.3 MB payload runner and wired it to execute automatically through five developer tools: Claude Code, Gemini CLI, Cursor, VS Code, and the npm test script.” “The attack detonates when a developer clones one of the affected repos and opens it in an AI coding agent,” the firm said. If that holds as a description of the campaign’s source-repository technique, it would make Miasma one of the first publicly documented supply-chain worms to weaponize AI coding-agent configuration as an execution trigger.

Once it runs, the payload hunts for cloud keys from Amazon Web Services, Google Cloud Platform and Microsoft Azure, GitHub Actions secrets pulled from runner process memory, and local password stores including 1Password, gopass and pass, according to the StepSecurity and Semgrep analyses. Stolen material flows to a dead-drop account on GitHub, liuende501, which those researchers found hosting 236 repositories built to receive encrypted credential files.

A wound that never fully closed

The Microsoft takedown emerged after these source-repository findings and appears connected to the same broader campaign, but the public record reviewed for this article does not establish that the Microsoft repositories carried the same AI-agent-triggered payload SafeDep documented elsewhere. What is documented is the lineage. Azure/durabletask, the repository at the center of the June 5 disablement, was the same project the group TeamPCP poisoned in May to deliver an information stealer on Linux systems. Miasma itself is assessed to be a variant of the Mini Shai-Hulud worm that TeamPCP released publicly in mid-May, according to Akamai.

Paul McCarty, the security researcher behind OpenSourceMalware who tracks the campaign as 6mile, sees a straight line between the two events. “A month later, not only is Azure/durabletask gone, so is every sibling repo in the Durable Task ecosystem,” McCarty said. “When the repo at the root of last month’s compromise is the hub of this month’s takedown, that is not a coincidence. That is the same wound reopening. Whoever held those credentials in May plausibly never fully lost them.”

His point carries an operational lesson. A disabled repository and a rotated token do not close an incident if the original access path survives. Teams that responded to the May intrusion by removing the malicious commit, without forcing a full credential reset across every contributor account that touched the project, left the door propped open.

Microsoft, GitHub, Red Hat and Vapi.ai did not provide comment in the public record reviewed for this article, and none had published a remediation timeline as of June 7. The operators, by contrast, have stayed active, cycling through repository descriptions, “Miasma: The Spreading Blight,” then “Hades, The End for the Damned,” as defenders fingerprint each label and hunt the public repositories holding stolen secrets.

What practitioners should do now

The defensive playbook here departs from muscle memory. Blocking preinstall and postinstall scripts, the standard advice for npm supply-chain risk, does nothing against a binding.gyp trigger. Security teams should treat node-gyp rebuild activity as a monitored event, not background noise, and they should consider installing dependencies with native builds disabled where a project does not require them.

The AI-agent angle demands its own response. Opening an untrusted repository inside Claude Code, Cursor or a comparable assistant now carries the same risk profile as running an unknown installer. Engineers should clone first, inspect agent configuration files before opening a project in any assistant, and run unfamiliar code in disposable or sandboxed environments. Credential hygiene closes the loop: short-lived tokens, scoped GitHub Actions secrets, and rotation that assumes compromise rather than hoping against it.

The governance and discovery questions

Step back from the malware and a set of governance questions comes into focus. What follows is analysis rather than reporting, but the alignment with regulated work is hard to miss. For information governance and eDiscovery professionals, Miasma raises preservation questions that few policies currently address. Developer workstations, npm and GitHub artifacts, continuous-integration logs and AI-agent configuration files could all become potential evidence in source-code-theft and breach matters, and they live in systems that legal teams rarely map. A credential harvested today can surface in litigation a year from now, which puts the chain of custody around developer environments in play.

For vendor diligence and compliance teams, the campaign sharpens an uncomfortable question: how much of your software bill of materials passed through a maintainer account or a build step you cannot independently verify? In parts of the campaign, the worm spread through trusted publishing paths and authenticated maintainer workflows, which is why conventional defenses struggled to catch it.

So here is the question worth carrying into your next architecture review: if your most trusted developer tool became the thing that executed an attacker’s code, would your monitoring ever know?

News sources



Assisted by GAI and LLM technologies

Additional reading

Source: ComplexDiscovery OÜ

ComplexDiscovery’s mission is to enable clarity for complex decisions by providing independent, data‑driven reporting, research, and commentary that make digital risk, legal technology, and regulatory change more legible for practitioners, policymakers, and business leaders.

 

Have a Request?

If you have information or offering requests that you would like to ask us about, please let us know, and we will make our response to you a priority.

ComplexDiscovery OÜ is an independent digital publication and research organization based in Tallinn, Estonia. ComplexDiscovery covers cybersecurity, data privacy, regulatory compliance, and eDiscovery, with reporting that connects legal and business technology developments—including high-growth startup trends—to international business, policy, and global security dynamics. Focusing on technology and risk issues shaped by cross-border regulation and geopolitical complexity, ComplexDiscovery delivers editorial coverage, original analysis, and curated briefings for a global audience of legal, compliance, security, and technology professionals. Learn more at ComplexDiscovery.com.

 

Generative Artificial Intelligence and Large Language Model Use

ComplexDiscovery OÜ recognizes the value of GAI and LLM tools in streamlining content creation processes and enhancing the overall quality of its research, writing, and editing efforts. To this end, ComplexDiscovery OÜ regularly employs GAI tools, including ChatGPT, Claude, Gemini, Grammarly, Midjourney, and Perplexity, to assist, augment, and accelerate the development and publication of both new and revised content in posts and pages published (initiated in late 2022).

ComplexDiscovery also provides a ChatGPT-powered AI article assistant for its users. This feature leverages LLM capabilities to generate relevant and valuable insights related to specific page and post content published on ComplexDiscovery.com. By offering this AI-driven service, ComplexDiscovery OÜ aims to create a more interactive and engaging experience for its users, while highlighting the importance of responsible and ethical use of GAI and LLM technologies.