Skip to content
RCE Write-up Advanced

Miasma: Supply Chain Attack Targeting RedHat npm Packages

A Red Hat employee's GitHub account was compromised, allowing the attacker to push malicious commits to several repositories and publish at least 32 compromised npm package versions under the @redhat-cloud-services namespace. The packages contained a preinstall script that executed an obfuscated payload, which collected cloud identities and secrets from infected machines.

Merav Bar Follow

Published on wiz.io

On 1 June 2026, Wiz Research identified a supply chain compromise affecting multiple packages published under the @redhat-cloud-services npm namespace. Investigation revealed that at least 32 package releases contained unauthorized modifications that do not match the corresponding source repositories.

Merav Bar, on wiz.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a compromised GitHub account with write access to the repositories, used to push malicious commits that bypassed code review and triggered a workflow to publish packages with valid provenance.

Impact

The malware could steal developer credentials, SSH keys, cloud credentials, and CI/CD secrets, and it added collectors for GCP and Azure identities, potentially allowing the attacker to gain access to cloud environments.

What the attacker needed

Compromised GitHub account with write access; victim installs an affected package version

The fix

The malicious package versions were revoked, and security teams should rotate credentials and strengthen supply chain defenses.

How it was found

  1. The attacker compromised a Red Hat employee's GitHub account.
  2. The attacker pushed malicious orphan commits to RedHatInsights repositories, bypassing code review.
  3. The commits added a workflow that requested an OIDC token for npm publishing.
  4. The workflow ran on push to any branch and executed an obfuscated payload.
  5. The payload published malicious package versions with valid SLSA provenance attestations.
  6. The malicious packages contained a preinstall script that executed a malicious index.js file during installation.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An attacker gained access to a Red Hat developer's GitHub account and used it to insert harmful code into software packages that many people download. When developers installed these packages, the code ran automatically and stole login details and cloud access keys from their computers.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Merav Bar

View all

27 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.