Supply Chain SecurityExplainerJul 17, 2026, 7:44 PM· 7 min read· #3 of 3 in technology

How the Miasma Worm Exploited AI Coding Tools to Compromise 73 Microsoft GitHub Repositories

A new supply chain attack bypassed traditional package managers by hiding credential-harvesting payloads inside the configuration files of popular AI coding assistants.

By Factlen Editorial Team

Threat Intelligence Analysts 40%Cloud Security Experts 35%Industry Policy Advocates 25%
Threat Intelligence Analysts
Security researchers tracking the evolution of the Miasma worm and its operators.
Cloud Security Experts
Professionals focused on enterprise defense and credential management.
Industry Policy Advocates
Organizations focused on standardizing security practices for AI tools.

What's not represented

  • · Independent Open-Source Contributors
  • · AI IDE Tooling Providers

Why this matters

As AI coding assistants like Cursor and Claude Code become standard, developers must recognize that repository configuration files are no longer just passive settings—they are executable attack vectors that can silently harvest cloud credentials the moment a project is opened.

Key points

  • The Miasma worm compromised 73 Microsoft GitHub repositories by hiding payloads in configuration files.
  • Unlike traditional attacks, the malware executes the moment a developer opens the repository in an AI-assisted IDE.
  • The payload targets popular tools like Cursor, Claude Code, and VS Code to harvest cloud credentials.
  • GitHub's automated abuse detection mitigated the threat by batch-disabling the affected repositories within 105 seconds.
  • The complete Miasma toolkit was open-sourced on June 9, significantly increasing the risk of copycat attacks.
73
Microsoft repositories disabled
105 seconds
Time to batch-disable repos
15
AI coding agents targeted

On June 5, 2026, the global open-source ecosystem witnessed a fundamental and alarming shift in how supply chain attacks operate against enterprise targets. In a highly coordinated event spanning just 105 seconds, GitHub's automated abuse detection systems forcibly disabled 73 repositories across four major Microsoft organizations. This unprecedented batch-takedown included critical infrastructure components, most notably the official Azure Functions deployment actions, which temporarily broke continuous integration pipelines for developers worldwide. The rapid sequence of HTTP 403 blocks, executed between 16:00:50 and 16:02:35 UTC, highlighted the severity of a breach that bypassed traditional security perimeters by targeting the very tools developers use to write code.[1][4]

The culprit behind this massive disruption was the Miasma worm, a highly sophisticated, self-replicating malware strain operated by a known threat group dubbed TeamPCP. While previous generations of supply chain attacks relied on developers actively downloading and installing poisoned software packages, Miasma eliminated that interactive requirement entirely. By evolving beyond the standard playbook of malicious dependencies, the worm demonstrated a terrifying new capability: executing its payload the exact moment a developer simply opened a compromised repository on their local machine, transforming passive code review into an active security incident.[1][4]

To understand the significance of Miasma, one must look at how traditional supply chain compromises typically function. Historically, attackers hide malicious code inside the installation scripts of popular package managers like npm, PyPI, or RubyGems. When a developer runs a command to install a library, these hidden scripts execute in the background. Over the years, the cybersecurity industry has adapted to this threat by deploying specialized scanning tools that audit these specific lifecycle hooks—such as preinstall or postinstall scripts—before allowing the installation to proceed, effectively catching most rudimentary attacks.[3][6]

Miasma successfully bypassed these established defenses by shifting the attack vector forward in the development lifecycle. Instead of waiting for a package to be formally installed or for a build process to initiate, the worm was meticulously designed to trigger its payload during the initial environment setup phase. This meant that simply cloning a repository and opening the folder to inspect the code was enough to compromise a workstation. The attack effectively turned the act of reading code into a dangerous operation, catching both developers and automated security sandboxes completely off guard.[1][2]

How the Miasma worm bypassed traditional package managers to execute upon repository opening.
How the Miasma worm bypassed traditional package managers to execute upon repository opening.

The mechanism enabling this instant, zero-click execution was the very tooling designed to make modern developers faster and more efficient: AI coding assistants. The attack specifically targeted the automated configuration parsing routines of popular AI-integrated development environments (IDEs) and command-line interfaces, including Cursor, Claude Code, Gemini CLI, and Visual Studio Code. Because these tools automatically scan workspace files to build context for their large language models, they inadvertently acted as the execution engine for the attackers' hidden scripts, highlighting a severe blind spot in how AI tools handle untrusted code.[1][3]

The breach of Microsoft's infrastructure began when attackers utilized a previously compromised, highly trusted contributor account to push a malicious commit directly to the Azure/durabletask repository. To evade casual human review and automated anomaly detection, the attackers employed sophisticated metadata spoofing. They specifically titled the commit "Switched DataConverter to OrchestrationContext [skip ci]" and backdated the commit timestamp to appear as if it were a routine, harmless update from March 9, 2020. This deceptive packaging allowed the malicious code to blend seamlessly into the repository's extensive commit history.[2][4]

Hidden within this seemingly innocuous commit were heavily obfuscated configuration files designed to exploit the AI tools' context-gathering behaviors. The payload included a modified .github/setup.js script, specialized workspace task files for Visual Studio Code, and poisoned mcp.json settings used by Model Context Protocol servers. These files were not standard application code; rather, they were environment instructions that modern IDEs are programmed to read and execute automatically in order to prepare the workspace, making them the perfect trojan horse for the Miasma worm.[2][5]

Hidden within this seemingly innocuous commit were heavily obfuscated configuration files designed to exploit the AI tools' context-gathering behaviors.

When a developer opened the compromised Azure/durabletask repository, their AI coding tool immediately began parsing these configuration files to understand the project's structure, dependencies, and required context. This routine, automated action inadvertently triggered the execution of the hidden JavaScript payload in the background. Because the execution was initiated by a trusted application—the developer's own IDE—and occurred entirely outside the context of a package manager, traditional dependency auditing tools and static code analyzers failed to flag the activity, allowing the malware to run unimpeded.[1][6]

Once the initial execution phase was successfully triggered, the payload initiated a complex sequence to establish a foothold on the victim's machine. It dynamically reached out to external servers to download a version of the Bun JavaScript runtime specifically tailored to the victim's operating system—seamlessly adapting to Linux, macOS, or Windows environments. By bringing its own runtime, the malware ensured it could execute its secondary, more aggressive stage without relying on the host machine's existing Node.js installation, further complicating detection efforts.[1]

The primary objective of this secondary payload was exhaustive, rapid credential harvesting. The malware systematically scoured the developer's local machine for highly privileged access tokens that could be used to pivot deeper into enterprise networks. The scanning scope was vast, targeting Azure service principals, AWS access keys, Google Cloud Platform service accounts, Kubernetes cluster secrets, HashiCorp Vault credentials, GitHub Personal Access Tokens, and personal SSH keys. By capturing these keys, the attackers gained the ability to impersonate the developer across virtually all corporate cloud infrastructure.[2][3]

The rapid escalation of the Miasma supply chain campaign in early June 2026.
The rapid escalation of the Miasma supply chain campaign in early June 2026.

To exfiltrate this massive trove of stolen data without triggering network security alarms or endpoint detection systems, Miasma employed a highly novel Command and Control (C2) strategy. Rather than sending data to a suspicious external IP address, the worm used GitHub's own Commit Search functionality as a covert communication channel. By encoding the stolen credentials and passing them through legitimate GitHub API requests, the outbound traffic appeared as standard developer activity to enterprise firewalls, rendering the entire exfiltration process virtually invisible to traditional network-layer monitoring.[1]

The potential blast radius of this credential harvesting campaign was catastrophic, given the widespread use of the targeted Microsoft repositories. However, GitHub's automated abuse detection systems identified the anomalous repository behavior and intervened almost immediately. In a sweeping automated enforcement action, the platform issued Terms of Service violations and locked down all 73 affected repositories within a two-minute window. This rapid, automated quarantine prevented the malicious configurations from being pulled down by thousands of downstream developers, effectively halting the worm's spread through official Microsoft channels.[4]

This high-profile incident was not an isolated event, but rather the culmination of a rapidly evolving and highly aggressive campaign by TeamPCP. Just days earlier, on June 1 and June 3, earlier variants of the Miasma worm had successfully compromised dozens of RedHat-affiliated packages and major AI SDKs on the npm registry. During those earlier waves, the attackers utilized a technique dubbed "Phantom Gyp," which abused native C++ binding files to trigger execution during installation, proving the group's relentless focus on bypassing conventional supply chain defenses.[1][6]

The extensive scope of credentials and AI tools targeted by the Miasma payload.
The extensive scope of credentials and AI tools targeted by the Miasma payload.

The threat landscape darkened significantly on June 9, when an unknown threat actor publicly open-sourced the complete Miasma toolkit on the internet. The released source code revealed a highly modular architecture with payloads explicitly designed to target 15 different AI coding agents, along with persistence mechanisms capable of surviving standard credential rotations. By making this sophisticated, per-infection encrypted malware available to the broader cybercriminal community, the release significantly lowered the barrier to entry, virtually guaranteeing a surge of derivative supply chain attacks in the coming months.[5]

The Miasma incident represents a fundamental paradigm shift in software development security. As AI programming tools become deeply integrated into daily engineering workflows, repository configuration files can no longer be treated as passive preference settings. They are now highly capable, executable delivery paths for attack payloads. This reality requires the cybersecurity industry to apply strict zero-trust principles not just to production servers, but to the local development environments themselves, ensuring that AI agents operate within secure sandboxes that cannot silently leak the keys to the kingdom.[6]

How we got here

  1. June 1, 2026

    Miasma Wave 1 compromises 32 RedHat-affiliated npm packages using malicious preinstall hooks.

  2. June 3, 2026

    Wave 2 launches, infecting 57 npm packages using the 'Phantom Gyp' technique to bypass security scans.

  3. June 5, 2026

    Attackers push a malicious commit to Azure/durabletask; GitHub disables 73 Microsoft repositories within 105 seconds.

  4. June 9, 2026

    An unknown threat actor open-sources the complete Miasma toolkit, targeting 15 different AI coding agents.

Viewpoints in depth

Threat Intelligence Analysts

Security researchers tracking the evolution of the Miasma worm and its operators.

Analysts view the Miasma campaign as a watershed moment in supply chain security. By shifting the execution trigger from the package installation phase to the repository cloning and opening phase, attackers have effectively outmaneuvered years of defensive tooling built around package managers. Researchers emphasize that the open-sourcing of the Miasma toolkit on June 9 accelerates this threat, providing less sophisticated actors with modular, enterprise-grade malware that explicitly targets the automated behaviors of modern AI coding assistants.

Cloud Security Experts

Professionals focused on enterprise defense and credential management.

For cloud security architects, the primary concern is the worm's aggressive credential harvesting capabilities. Experts point out that developer laptops are often the most over-privileged and under-monitored assets in an enterprise network. The fact that Miasma could silently exfiltrate AWS, Azure, and Kubernetes secrets using GitHub's own search functionality as a C2 channel highlights a massive blind spot in egress filtering. They advocate for immediate credential rotation and the implementation of zero-trust architectures that sandbox local development environments.

Industry Policy Advocates

Organizations focused on standardizing security practices for AI tools.

Groups like the Cloud Security Alliance stress that the Miasma incident exposes a critical flaw in the shared responsibility model for AI tooling. They argue that the vulnerability does not lie within the AI models themselves, but rather in how IDEs blindly trust repository configuration files to set up context. Advocates are calling for standardized security controls that restrict AI agents from executing arbitrary scripts without explicit human authorization, treating all workspace configurations as untrusted by default.

What we don't know

  • Whether the attackers successfully exfiltrated credentials from Microsoft employees before the repositories were disabled.
  • The true identity of the unknown actor who open-sourced the Miasma toolkit on June 9.
  • How many downstream enterprise developers were compromised by cloning the affected repositories during the brief window they were active.

Key terms

Supply chain attack
A cyberattack that targets a software vendor or open-source component to compromise the downstream users who rely on that software.
Miasma worm
A specific strain of self-replicating malware designed to harvest developer credentials and spread across code repositories.
C2 (Command and Control)
The infrastructure used by attackers to send instructions to compromised systems and receive stolen data.
Phantom Gyp
A technique used by the Miasma worm to execute malicious code during package installation by abusing the binding.gyp file, bypassing standard security checks.

Frequently asked

What is the Miasma worm?

A self-replicating supply chain malware that targets developer environments to steal cloud and repository credentials.

How did the attack bypass traditional security?

Instead of hiding in installable packages, it hid in repository configuration files that execute automatically when opened in AI-assisted coding tools.

Are regular text editors vulnerable?

The specific payloads in this attack targeted the automated context-gathering features of AI tools like Cursor, Claude Code, and VS Code, rather than passive text editors.

What should affected developers do?

Immediately rotate all credentials (AWS, Azure, GitHub tokens, SSH keys) and audit local IDE configurations for malicious hooks.

Sources

Source coverage

6 outlets

3 viewpoints surfaced

Threat Intelligence Analysts 40%Cloud Security Experts 35%Industry Policy Advocates 25%
  1. [1]NSFOCUSThreat Intelligence Analysts

    Miasma worm hits 73 Microsoft GitHub repositories

    Read on NSFOCUS
  2. [2]ThreatLockerCloud Security Experts

    Miasma worm hits 73 Microsoft GitHub repositories and directly targets StepSecurity's Harden-Runner

    Read on ThreatLocker
  3. [3]Harpy Cloud SolutionsCloud Security Experts

    Microsoft GitHub repositories were hit by the Miasma worm campaign

    Read on Harpy Cloud Solutions
  4. [4]StepSecurityThreat Intelligence Analysts

    Miasma Worm Hits Microsoft Again: Azure Functions Action and 72 Other Repositories Disabled

    Read on StepSecurity
  5. [5]DataMinrThreat Intelligence Analysts

    Evolving Supply Chain Attacks with Open Source Miasma

    Read on DataMinr
  6. [6]Cloud Security AllianceIndustry Policy Advocates

    Miasma: From npm Worm to AI IDE Backdoor

    Read on Cloud Security Alliance
Stay informed

Every angle. Every day.

Get technology stories with full source coverage and perspective breakdowns delivered to your inbox.