npm Supply Chain Attack: Red Hat Compromised via Mini Shai-Hulud

npm Supply Chain Attack: Red Hat Compromised via Mini Shai-Hulud

lschvn

On June 1, 2026, Wiz Research identified a new wave of npm supply chain compromises targeting the @redhat-cloud-services namespace. The campaign, dubbed Miasma, injected credential-stealing malware into at least 32 package releases, cumulatively averaging around 80,000 weekly downloads. The malicious code has since been mostly revoked, but the incident exposes how far supply chain attackers have evolved.

A Familiar Toolkit with New Tricks

The payload is derived from the Mini Shai-Hulud malware, open-sourced by threat actor TeamPCP in late 2025. Previous campaigns using this toolkit targeted Tanstack and other major npm packages. The Miasma variant makes cosmetic changes β€” Dune universe references replaced with Greek mythology ("spartan") β€” but the underlying tradecraft is substantially the same.

What changed in this iteration is the targeting scope. The malware now explicitly harvests GCP and Azure identities, collecting every cloud identity the infected machine can access. Rather than purely extracting secrets, the attackers are now interested in gaining direct access to cloud environments themselves.

The second notable evolution is per-infection encryption. Previous Shai-Hulud variants self-replicated with minimal variation, making hash-based IOC tracking viable. Miasma generates a unique encrypted payload for each infection, meaning a hash that catches one compromised machine will not catch another.

How the Attack Worked

Evidence indicates a Red Hat employee GitHub account was compromised and used to push malicious orphan commits to three RedHatInsights repositories:

  • RedHatInsights/frontend-components
  • RedHatInsights/javascript-clients
  • RedHatInsights/platform-frontend-ai-toolkit

These commits introduced a minimal GitHub Actions workflow that triggered on any push to any branch. The workflow requested a GitHub OIDC identity token (id-token: write) and executed an obfuscated _index.js payload that published packages directly to npm β€” with valid SLSA provenance attestations.

SLSA provenance is meant to verify that a package was built from a specific source commit by a trusted builder. By generating valid attestations, the attacker made the malicious packages appear as legitimate Red Hat releases, undermining a key supply chain security mechanism.

Scope of the Damage

The attack affected a broad range of Red Hat Cloud Services JavaScript clients:

PackageCompromised Versions
@redhat-cloud-services/topological-inventory-client3.0.10, 3.0.11, 3.0.13
@redhat-cloud-services/rbac-client9.0.3, 9.0.4, 9.0.6
@redhat-cloud-services/insights-client4.0.4, 4.0.5, 4.0.7
@redhat-cloud-services/frontend-components7.7.2, 7.7.3, 7.7.5
@redhat-cloud-services/notifications-client6.1.4, 6.1.5, 6.1.7

A second wave emerged on June 4, using binding.gyp (a native Node.js build configuration file) to execute malicious code during package installation, consistent with the Miasma campaign.

What This Means for the npm Ecosystem

The Miasma attack demonstrates a troubling progression in npm supply chain warfare. Three key takeaways:

Trusted publishers are the weak link. SLSA provenance, OIDC tokens, and "verified publisher" badges were all subverted here. The security model assumes that a publisher's GitHub account and npm account are secure. Both were compromised.

Open-source malware lowers the bar. TeamPCP published Mini Shai-Hulud's code publicly. Miasma is not attributed to TeamPCP with certainty β€” the similarities could indicate copycat actors using the same publicly available toolkit.

Detection is getting harder, not easier. Per-infection encryption, SLSA attestation abuse, and living-off-the-land techniques mean traditional defenses (package scanning, hash-based IOCs) are increasingly insufficient.

Organizations using Red Hat's JavaScript clients should:

  1. Audit for affected package versions and upgrade to patched releases
  2. Rotate all secrets accessible from developer workstations β€” GitHub tokens, cloud credentials, CI/CD secrets
  3. Review GitHub activity for unauthorized repositories, new access tokens, or suspicious workflow executions
  4. Implement dependency allowlisting and enforce it via .npmrc or corporate policy
  5. Generate SBOMs for all production dependencies to enable faster incident response

The npm ecosystem remains a high-value target. Miasma is not an isolated incident β€” it is the latest iteration in an escalating campaign.

Frequently Asked Questions

Related articles

More coverage with overlapping topics and tags.

State of TypeScript 2026: GitHub's #1 Language, Project Corsa, and the Supply Chain Reckoning
TypeScript

State of TypeScript 2026: GitHub's #1 Language, Project Corsa, and the Supply Chain Reckoning

A look back at the major events that reshaped TypeScript's position in the JavaScript ecosystem β€” from surpassing JavaScript on GitHub to npm supply chain compromises and the Go-based compiler rewrite targeting 10x faster builds.
Axios npm Supply Chain Attack: Malicious Versions Drop Remote Access Trojan
security

Axios npm Supply Chain Attack: Malicious Versions Drop Remote Access Trojan

Two poisoned releases of axios β€” one of the most widely-used Node.js HTTP client libraries β€” were published and pulled from npm within hours. Here's what happened, how the attack worked, and what you need to do right now.
State of Web Dev AI 2026: Code Generation Jumps to 54%, Claude Dominates Paid Usage
TypeScript

State of Web Dev AI 2026: Code Generation Jumps to 54%, Claude Dominates Paid Usage

The 2026 State of Web Dev AI survey of 7,258 developers reveals AI-generated code占比 hit 54%, AI coding agents are rising, and 60% of respondents believe we are in an AI bubble.

Comments

Log in Log in to join the conversation.

No comments yet. Be the first to share your thoughts.