The Worms Are Back In Town: Stealing Cloud Keys, AI Secrets, and Breaking Supply Chains

By Brad LaPorte, CMO, Morphisec [ Join Cybersecurity Insiders ]

Self-replicating worms were supposed to be a historical footnote. The kind of threat that filled incident reports in the early 2000s and got retired as the industry matured, detection tools improved, and software supply chains became more disciplined. Then came the first week of June 2026, when two worms, Miasma and IronWorm, made clear that the retirement was temporary, and the industry’s confidence was misplaced.

What happened in those first days of June is worth understanding precisely, because the details matter more than the headline.

Attackers compromised a Red Hat employee’s GitHub account and used it to publish malicious versions of 32 widely downloaded npm packages with between 80,000 and 117,000 weekly downloads. The Miasma worm embedded in those packages didn’t wait to be imported, called, or used. It executed the moment npm install ran, through a preinstall hook that fires before the dependency tree is even resolved. 

From there, it swept GitHub tokens, cloud credentials, and CI/CD secrets, then used the stolen OIDC tokens to republish itself across every package the compromised maintainer owned. The entire Red Hat wave took 72 seconds. By June 5, Miasma had reached Microsoft, forcing GitHub to disable 73 repositories across four Azure-related organizations. A new variant has since hit 57 packages across 286 malicious versions.

In parallel, a separate Rust-built stealer called IronWorm spread through 50-plus poisoned packages. It arrives with a custom-modified UPX stub to break unpackers, per-call-site string encryption, and an embedded eBPF rootkit for kernel-level persistence. Every one of those engineering choices exists to ensure detection tools have no clean signal at the moment the payload fires.

This is not another npm cleanup story. It is a structural argument about where the industry’s defensive model breaks down.

The Timing Problem

While most coverage of Miasma and IronWorm has focused on what they stole and how they spread, the more important question is when they ran. The answer is that they ran before any scanner or endpoint detection tool had a verdict.

The preinstall hook is not an obscure attack surface. It is a documented feature of the npm package installation process, and it executes in memory before the developer has even finished thinking about what they just installed. Software composition analysis tools, which are the standard defensive response to supply chain threats, are built to scan packages and flag known-bad indicators. A preinstall hook that fires a 976-kilobyte obfuscated Rust binary the instant installation begins is engineered specifically so that the answer to “is this known-bad?” is “not yet.” The verdict arrives after execution. After the credential sweep. After the worm has already re-signed and republished itself.

That timing gap is not a failure of any individual tool. It is a structural property of how detection works. Detection requires a signal. A payload built to have no signal at the moment it matters will beat detection every time, regardless of how good the tools are.

The Loot Has Changed

What Miasma and IronWorm are hunting makes the timing problem more consequential than it might appear. These worms are after access, not records.

IronWorm’s target list includes credentials for OpenAI Codex, Anthropic Claude, Google Gemini, Cursor, AWS, Docker, Kubernetes, Vault configurations, and crypto wallets. Miasma goes for GitHub tokens, cloud credentials, and CI/CD secrets. When the payload succeeds, the attacker doesn’t walk away with a data set. They walk away with the keys to everything downstream — AI models, cloud infrastructure, deployment pipelines, and every system those credentials touch.

This is a meaningful escalation. Stolen records create a breach. Stolen access keys create a persistent, silent presence across an organization’s entire operational stack. The response is also fundamentally different. You can notify affected individuals about a data breach, but you cannot easily quantify or contain what an attacker does with unrestricted access to your cloud infrastructure and AI environment over days or weeks before discovery.

Why Worms Came Back

Self-replicating worms went quiet because the industry got better at recognizing them. That recognition depended on pattern matching — known signatures, known behaviors, known indicators of compromise. The lesson attackers drew from the quiet period was not that worms were no longer viable. What they learned was that worms needed to be built so that the pattern-matching would arrive too late.

Miasma and IronWorm embody this realization. Both are engineered at every layer, execution model, obfuscation, propagation speed, and evasion stack, to ensure that the industry’s standard defensive sequence runs out of time before it runs out of options. The 72-second propagation window is not incidental. It is the design.

The industry response to this cannot be more of what has already failed. Scanners and EDR tools still matter. Keep them because they answer the question, “Is this known bad?” For a large portion of the threat landscape, that question is the right one. But with a preinstall worm the answer to that question is always “not yet.” Therefore, layering more detection on top of detection does not close that window. It assumes the window can be narrowed through speed and coverage. Miasma and IronWorm are evidence that it cannot.

The Only Defense Positioned at the Right Moment

Closing the execution window requires a different kind of control that is positioned at the moment the payload fires, not after. Deterministic prevention at runtime does not ask whether a payload is known-bad. It removes the execution target. As a result, when the obfuscated binary fires from the install hook, the runtime it expects has been morphed, and the code fails to execute before it can sweep a single credential. There is no exfiltration because there is no successful execution. There is no incident to respond to because the execution step that creates the incident never completes.

That is how the gap these worms exploit gets closed. It’s not by improving the speed of the verdict, but by removing the environment the payload needs to run.

Self-replicating worms came back because the industry gave them a window,  that moment between install and verdict, and assumed it was too small to matter. Miasma closed that window in 72 seconds. The question now is whether the industry is willing to defend at the one moment that actually counts.

Join our LinkedIn group Information Security Community!

No posts to display