Skip to content

Back to the catalog

Red Hat npm Packages Compromised to Spread a Credential-Stealing Worm
aikido.devwriteup

Red Hat npm Packages Compromised to Spread a Credential-Stealing Worm

Aikido details a June 2026 compromise of 96 versions across 32 @redhat-cloud-services npm packages (116,991 weekly downloads) with "Miasma," a new variant of the TeamPCP-authored Mini Shai-Hulud credential-stealing worm whose source was open-sourced in May 2026. Attackers compromised a Red Hat employee's GitHub account to push malicious orphan commits containing a GitHub Actions workflow that abused OIDC id-token: write permissions to authenticate to npm's trusted publishing endpoint and republish backdoored packages; each package's preinstall script then ran a 4.2MB obfuscated payload that swept GitHub Actions, AWS, GCP, Azure, Vault, Kubernetes, npm/PyPI, SSH, Docker, GPG, and .env credentials. The piece also lays out the broader Mini Shai-Hulud campaign timeline (Bitwarden CLI, SAP, PyTorch Lightning, Mistral/TanStack, Microsoft DurableTask) and full IOC package/version list.

TL;DR A compromised Red Hat GitHub account led to 32 @redhat-cloud-services npm packages being backdoored via an OIDC trusted-publishing bypass to spread the Miasma/Mini Shai-Hulud credential-stealing worm.
Document

What it is

The Aikido advisory on the June 1, 2026 compromise of 32 @redhat-cloud-services npm packages (96 versions, ~116,991 weekly downloads) with "Miasma," a Mini Shai-Hulud variant. What the summary does not carry: the concrete indicators to hunt for, the rotation trigger date, and the specific detail that this was a trusted-publishing bypass, not a stolen npm token.

How it works

A compromised Red Hat employee GitHub account pushed orphan commits directly to repos (e.g. RedHatInsights/frontend-components), bypassing code review. Those commits added a workflow ci.yaml and a script _index.js. The workflow requests id-token: write permission, runs bun run _index.js, and passes a target package list via an OIDC_PACKAGES env var. _index.js uses the short-lived GitHub OIDC token to authenticate to npm's trusted-publishing endpoint and publish backdoored versions. Each published package carries a preinstall hook that runs a 4.2 MB obfuscated index.js on every install, before any application code.

The key inversion the page states: OIDC trusted publishing was meant to eliminate long-lived tokens, but a compromised CI pipeline turns it into a "misleading trust signal" — the publish looks legitimate because it came through OIDC.

Preconditions / Affected

Anyone who installed an affected @redhat-cloud-services package version on or after June 1, 2026. The preinstall script runs credential theft during npm install regardless of whether the package is imported.

What to do

The page's explicit instruction: if you installed any affected version since June 1, 2026, treat all CI secrets, cloud credentials, SSH keys, and npm tokens as compromised and rotate them immediately.

Hunt for these indicators:

  • Repo commits: unexplained orphan commits adding ci.yaml and _index.js
  • A workflow granting id-token: write that runs bun run _index.js with an OIDC_PACKAGES env var
  • package.json containing:
"scripts": {
  "preinstall": "node index.js"
}
  • Pinned action SHAs used by the malicious workflow: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd and oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6

Credentials the payload targets — check exposure and rotation scope: GitHub Actions GITHUB_TOKEN and ACTIONS_RUNTIME_TOKEN; AWS access keys and session tokens; GCP application default credentials and service-account key files; Azure service principal and managed-identity tokens.

Caveats

The fetched text is truncated mid-sentence in the "What it steals" section ("It also sweeps for…"), so the full credential list is incomplete here. Attribution to TeamPCP is by malware resemblance; because the Mini Shai-Hulud source was open-sourced (May 12, 2026), the page notes other actors can now run identical campaigns, so these indicators are not unique to one group.

Organisations named here

  • Shai-Hulud

Technologies named here

  • @redhat-cloud-services/chrome
  • Aikido malware detection / central feed
  • Aikido Device Protection
  • @redhat-cloud-services/compliance-client
  • Aikido Safe Chain
  • @redhat-cloud-services/config-manager-client
  • GitHub Actions OIDC / npm trusted publishing
  • @redhat-cloud-services/entitlements-client
  • Bun
  • @redhat-cloud-services/eslint-config-redhat-cloud-services
  • @redhat-cloud-services/frontend-components
  • @redhat-cloud-services/frontend-components-config
  • @redhat-cloud-services/frontend-components-config-utilities
  • @redhat-cloud-services/frontend-components-notifications
  • @redhat-cloud-services/frontend-components-remediations
  • @redhat-cloud-services/frontend-components-testing
  • @redhat-cloud-services/frontend-components-translations
  • @redhat-cloud-services/frontend-components-utilities
  • @redhat-cloud-services/hcc-feo-mcp
  • @redhat-cloud-services/hcc-kessel-mcp
  • @redhat-cloud-services/hcc-pf-mcp
  • @redhat-cloud-services/host-inventory-client
  • @redhat-cloud-services/insights-client
  • @redhat-cloud-services/integrations-client
  • @redhat-cloud-services/javascript-clients-shared
  • @redhat-cloud-services/notifications-client
  • @redhat-cloud-services/patch-client
  • @redhat-cloud-services/quickstarts-client
  • @redhat-cloud-services/rbac-client
  • @redhat-cloud-services/remediations-client
  • @redhat-cloud-services/rule-components
  • @redhat-cloud-services/sources-client
  • @redhat-cloud-services/topological-inventory-client
  • @redhat-cloud-services/tsc-transform-imports
  • @redhat-cloud-services/types
  • @redhat-cloud-services/vulnerabilities-client
  • Bitwarden CLI
  • SAP npm packages
  • PyTorch Lightning
  • Mistral npm packages
  • TanStack npm packages
  • Microsoft DurableTask npm package
  • Intercom
  • npm
  • GitHub Actions
  • OIDC
  • Vault
  • Red Hat

Techniques named here

  • Malicious GitHub Actions workflow using id-token
  • Trusted publishing bypass

Threat actors named here

  • TeamPCP
  • Mini Shai-Hulud
  • Miasma