What happened
Replaying the Red Hat Miasma June 2026 intrusion
- 1
Account and pipeline takeover
May 29 – Jun 1, 2026A GitHub account is compromised through a malicious VS Code extension, and orphan commits add a publishing workflow to the RedHatInsights repositories.
- 2
Trusted publishing carries the malware
Jun 1, 2026, 10:53 – 13:46 UTCThe added workflow requests an OIDC token and publishes 96 trojanized versions of 32 packages in two waves, with authentic provenance.
- 3
Install-time credential harvest
Jun 1, 2026A preinstall hook starts a Bun-based payload that reads cloud, Kubernetes, Vault and CI credentials from the host and commits them to a public repository in the victim's account.
- 4
Worm spread
Jun 1, 2026; as reportedThe payload republishes the maintainer's packages with stolen npm tokens and injects itself into non-protected branches of other repositories.
32 packages of the @redhat-cloud-services scope were published in 96 malicious versions on June 1, 2026. The install-time payload targeted AWS, Azure and Google Cloud credentials, Kubernetes and Vault tokens and CI secrets, and spread to other repositories. Red Hat found no customer or partner impact and no product build or console release that used the versions, and Microsoft confirms no specific victim compromise.
Where cloud-provider controls fit
The takeover, the publish and the spread run through GitHub and npm, so the controls that would have stopped or capped them are the platforms' own: a branch ruleset without bypass, a reviewed GitHub environment named in the npm trusted publisher, and the npm ignore-scripts setting. On the clouds, the credentials the payload read are bounded, not protected: an AWS service control policy on the VPC of a role credential, an Azure Key Vault firewall and a Google Cloud VPC Service Controls perimeter would have refused them from the attacker's network, and Kubernetes bound tokens would have limited a stolen service-account token. A GitHub Enterprise Managed Users account can own only private repositories, and the sources do not say which kinds of account the victims used. The editor extension, the memory of a runner and the registry sit outside the cloud control plane: you own what runs on your endpoints and runners.
Could this have been prevented?
In hindsight, not as a whole. 1 control would have refused a step outright, and 19 controls would have limited one. 7 steps have no cloud-provider control. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.
- 1
- Prevented
- 19
- Contained
- 7
- Not covered
How it could have been prevented
The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.
Replaying the Red Hat Miasma June 2026 intrusion
1 · Account and pipeline takeover
1 Contained2 Not covered2 · Trusted publishing carries the malware
1 Contained1 Not covered3 · Install-time credential harvest
1 Prevented16 Contained3 Not covered3 on other clouds4 · Worm spread
1 Contained1 Not coveredKey facts
- Red Hat dates the initial compromise to May 29, 2026: a GitHub account was compromised through a malicious VS Code extension that the bulletin does not name; OX Security recorded the earliest infected repository on May 29 at 06:10:44 +0800 and says it may show actor testing or an earlier infection
- On June 1, 2026 orphan commits pushed with that account added a workflow and a script to RedHatInsights repositories, three of them per Orca Security; Aikido says the pushes bypassed code review and Upwind says branch protections and review
- The workflow published 96 versions of 32 packages in two waves, at about 10:53 UTC and from 13:44 to 13:46 UTC, through GitHub Actions OIDC trusted publishing with authentic provenance; Microsoft counts more than 90 versions
- Each version added a preinstall script that ran a 4.29 MB obfuscated file, which read AWS, Azure and Google Cloud credentials, Kubernetes and Vault tokens and CI secrets from the host and committed them to a public repository named "Miasma: The Spreading Blight" in the victim's GitHub account
- The sources give about 80,000 to 117,000 weekly downloads of the affected packages, and 309 GitHub repositories compromised per Aikido via BleepingComputer or over 210 holding stolen credentials per OX Security; neither count is explained
- On June 1 Red Hat contained the extension and removed the packages from npm; it also revoked compromised tokens and found no product build that used the versions, and Microsoft says GitHub invalidated npm tokens with write access and 2FA bypass
Sources
Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.
- 1.Supply chain compromise of @redhat-cloud-services npm packages (RHSB-2026-006)Red Hat · Jun 1, 2026 · AdvisoryInitial compromise date, account takeover path, scope, containment, customer impact
- 2.Preinstall to persistence: Inside the Red Hat npm Miasma credential-stealing campaignMicrosoft Threat Intelligence · Jun 2, 2026 · ResearchPayload behavior, credential targets on each cloud, persistence, exfiltration, propagation, victim impact
- 3.Red Hat npm Packages Compromised to Spread a Credential-Stealing WormAikido Security · Jun 1, 2026 · ResearchPackage and version counts, publish path, credential targets
- 4.New Shai-Hulud hits npm: @redhat-cloud-services CompromisedOX Security · Jun 1, 2026 · ResearchEarliest infected repository, persistence, decoy C2, repository counts
- 5.Miasma: A Worming npm Supply Chain Attack on Red Hat Cloud ServicesUpwind · Jun 4, 2026 · ResearchPublish waves, initial access as reported, mitigations
- 6.Red Hat npm Packages Compromised in Supply-Chain Attack Spreading Credential-Stealing WormOrca Security · Jun 1, 2026 · ResearchAbused repositories, publish waves, cloud credential details
- 7.Red Hat npm packages compromised to steal developer credentialsBleepingComputer · Jun 1, 2026 · NewsRed Hat statement, repository count
- 8.'Miasma' worm infests Red Hat npm packagesiTnews · Jun 2, 2026 · NewsRed Hat statement on impact, weekly downloads
The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.