NPM-REDHAT-MIASMA-2026
Summary
In June 2026 the npm supply-chain worm finally produced something genuinely new and frightening: malicious packages that were signed and carried valid build provenance. Attackers used a compromised GitHub account inside Red Hat's own organisation to publish trojanised versions of 31 packages in the @redhat-cloud-services namespace through Red Hat's legitimate CI pipeline, so the poisoned releases arrived with authentic attestations proving they were built by the real build system. The payload, nicknamed Miasma, was a lightly re-skinned copy of Mini Shai-Hulud, a worm that a group called TeamPCP had open-sourced for anyone to reuse weeks earlier. No Red Hat customers were harmed, because Red Hat strips install scripts before deployment, but the permanent lesson is uncomfortable: a signature proves where a package was built, not that the build was clean.
How it happened
The compromise surfaced around 1 June 2026, disclosed not by Red Hat but by a StepSecurity researcher who opened a public security issue on the RedHatInsights/javascript-clients repository. The entry point was a compromised GitHub account inside the RedHatInsights organisation. Researchers describe it as a Red Hat employee account; Red Hat's own advisory says only that "a compromised GitHub account was used." That account pushed malicious orphan commits, which sit outside the normal branch history and so slip past code review entirely.
Those commits then rode the project's own GitHub Actions release workflow, which requests a short-lived OIDC token to publish to npm through trusted publishing. Because the genuine, authorised pipeline did the publishing, the trojanised packages carried valid SLSA Build Level 3 provenance. Unit 42 called it the first documented case of a worm shipping malicious npm packages with valid build provenance. Each package declared a preinstall hook that executed an obfuscated dropper, swelling a normal index.js of roughly 200 KB into a payload of about 4.29 MB. The malware was Miasma, a cosmetic re-theme of Mini Shai-Hulud with the Dune references swapped for Greek mythology and attacker repositories stamped "Miasma: The Spreading Blight."
The damage
The campaign hit 31 packages across 96 malicious versions, frontend libraries and API clients for the Red Hat Hybrid Cloud Console, drawing roughly 80,000 weekly downloads cumulatively (some counts put the figure higher, near 117,000). The dropper swept developer and CI secrets: GitHub Actions tokens, npm tokens, and cloud credentials for AWS, Azure, and Google Cloud, plus Kubernetes, HashiCorp Vault, and SSH keys. This variant added fresh collectors for GCP and Azure cloud identities, a deliberate shift from harvesting secrets toward seizing standing cloud access. Like its Shai-Hulud ancestors it behaved as a worm, using stolen npm tokens to republish itself into other packages and actively trying to evade runtime defences such as StepSecurity's Harden-Runner.
The one piece of good news was containment. No compromised version reached production: Red Hat's publication process strips install-time scripts before deployment to console.redhat.com, and no console release was published during the compromise window. Worth noting for any reader sizing the impact: every quantitative figure here came from outside researchers, not from Red Hat, which published no package, version, or download count of its own.
Who was behind it
The tradecraft matches TeamPCP, the group behind the 2026 Mini Shai-Hulud waves that, on 12 May 2026, open-sourced the worm publicly under the banner "Shai-Hulud: Open Sourcing The Carnage" and even ran a contest for the largest attack built with it. But both Wiz and Unit 42 refuse to call the link definitive. Once the worm was public, any competent actor could reproduce the same attack, so the overlap is evidence of a shared technique, not proof of who pulled the trigger. Microsoft documented Miasma without attributing it to TeamPCP at all. The collapse of clean attribution is itself the consequence of open-sourcing the malware. The full arc, from the first self-propagating worm to publicly released attack code, lives in the Shai-Hulud lineage.
Why it matters
This is the incident where "signed and attested" stopped meaning "safe." Build provenance and SLSA attestations prove that a particular pipeline built a particular package. They are a statement about integrity, not trustworthiness. Subvert the identity that drives the pipeline and the attestation will faithfully sign malware. That moves the defensive centre of gravity onto CI identity: who can trigger a publishing workflow, what an OIDC token is scoped to, and whether a human approves a release before it ships. It is also the first major real-world incident built from open-sourced worm code, the moment the Shai-Hulud technique became a commodity that any actor can pick up and run.
How to fix it
- If you consumed any affected @redhat-cloud-services version, pin back to a known-good release, rebuild from a clean lockfile, and assume any machine that ran the install is compromised: rotate GitHub, npm, and cloud credentials it could reach.
- Audit build logs and npm for unexpected publish events and newly created tokens, and remove any unauthorised workflow or self-hosted runner the worm may have registered.
- Do not treat the presence of a valid provenance attestation as a clean bill of health; confirm the publish was an intended, human-approved release before trusting it.
How to avoid it
- Scope CI publishing identity tightly: restrict OIDC token issuance (id-token: write) to specific release workflows on protected branches and tags, never on arbitrary pushes.
- Require a human-gated, 2FA-approved step before a package version goes live (for example npm staged publishing), so a compromised workflow cannot publish on its own.
- Treat build provenance as integrity, not trust: it tells you where a package was built, not that the build environment was clean.
- Monitor for anomalous publishes, unexpected new repositories or runners, and orphan commits, and run installs with scripts disabled in least-privilege environments.
References
- https://www.wiz.io/blog/miasma-supply-chain-attack-targeting-redhat-npm-packages
- https://unit42.paloaltonetworks.com/monitoring-npm-supply-chain-attacks/
- https://www.stepsecurity.io/blog/multiple-redhat-cloud-services-npm-packages-compromised
- https://access.redhat.com/security/vulnerabilities/RHSB-2026-006
- https://github.com/RedHatInsights/javascript-clients/issues/492
- https://research.jfrog.com/post/shai-hulud-miasma-redhat-cloud-services/
- https://www.microsoft.com/en-us/security/blog/2026/06/02/preinstall-persistence-inside-red-hat-npm-miasma-credential-stealing-campaign/
Related vulnerabilities
All Supply chain →- CRITICALNPM-AXIOS-2026
On 31 March 2026 the single most widely used HTTP client in the JavaScript world was turned into malware for about three hours. Axios carries well over 100 million weekly downloads and sits as a transitive dependency underneath a huge share of the npm ecosystem, so when a North Korea-nexus actor took over the maintainer's account and published two booby-trapped versions, the blast radius was enormous even though the bad versions were live only for one early-morning window. The poisoned releases pulled in a hidden dependency that ran on install and dropped a cross-platform remote access trojan onto developer machines and CI runners. It is the case study in why a few hours of a popular package being compromised is still a global incident, and in why a maintainer's own laptop is now a nation-state target.
- CRITICALNPM-SHAI-HULUD-2-2025
Shai-Hulud is the nightmare the npm ecosystem had long feared: a self-replicating worm. First seen in September 2025 and back in a more aggressive wave around 21-24 November 2025 ("The Second Coming"), it does not just poison one package and wait. When its malware runs in a developer's environment, it harvests every secret it can find, npm tokens, GitHub tokens, cloud keys, then uses those stolen npm tokens to automatically publish itself into other packages the victim maintains, spreading from maintainer to maintainer on its own. The second wave hit more than 25,000 GitHub repositories across roughly 500 compromised accounts, leaked the stolen secrets into public repos, and, if it failed to steal credentials, tried to wipe the victim's home directory. It is the moment supply-chain malware learned to propagate like a biological infection.
- CRITICALNPM-SHAI-HULUD-2025
Shai-Hulud, in September 2025, was the moment the npm ecosystem's oldest nightmare came true: a worm that spreads by itself. It began with a wave of compromised packages, the most prominent being @ctrl/tinycolor (over two million weekly downloads), and from there it did something no npm attack had done before. When its malware ran on a developer's machine, it hunted for every credential it could find, then used the developer's own npm token to republish itself into all of their other packages automatically, with no attacker involvement, jumping from maintainer to maintainer like an infection. More than 500 packages were compromised, including some from CrowdStrike. It is the first true npm worm (tracked as GHSA-6m4g-vm7c-f8w6 and GHSA-f3v2-259r-f6jc), the template for the more aggressive Second Coming that followed weeks later, and the ancestor of an entire 2026 lineage that ended with the worm's code being open-sourced for anyone to reuse.
- HIGHCVE-2025-30066
tj-actions/changed-files was one of the most widely used GitHub Actions on the planet, wired into the CI pipelines of more than 23,000 repositories just to list which files a pull request touched. On 14 March 2025 it was turned into a weapon. An attacker who had stolen the credentials of the project's bot account rewrote nearly every version tag, from v1 all the way to v45.0.7, so they all pointed at one malicious commit. Any pipeline that pulled the action then ran code that dumped the build runner's memory and printed the secrets it found, AWS keys, GitHub tokens, npm tokens, private keys, straight into the workflow logs. Tracked as CVE-2025-30066, it is the defining modern CI/CD supply chain attack, and a blunt lesson that a version tag is a sticky note, not a lock.
- HIGHCVE-2026-62680
Orval: Generation-time SSRF + remote/local file inclusion via unrestricted $ref
- CRITICALGHSA-93qj-5q5v-3c2h
Trojanized pantheon-agents 0.6.1 and 0.6.2 on PyPI ship a credential stealer (supply-chain account compromise)