# Red Hat: a malicious VS Code extension poisoned 32 @redhat-cloud-services npm packages with valid OIDC provenance

- **Canonical URL:** https://breachidents.com/incidents/redhat-jun-2026-cloud-services-npm
- **Organization:** Red Hat
- **Incident date:** May 29–Jun 4, 2026
- **Disclosed / updated:** Jun 1, 2026
- **Category:** CI supply chain
- **Primary source:** Red Hat Product Security Bulletin (RHSB-2026-006) (https://access.redhat.com/security/vulnerabilities/RHSB-2026-006)

## In 30 seconds

- **How they got in:** A developer’s GitHub account compromised by a malicious VS Code extension pushed unauthorized commits into RedHatInsights repos _[Confirmed]_
- **What leaked / reached:** RedHatInsights GitHub repos, altered developer config files, and 32 @redhat-cloud-services frontend npm packages published with valid OIDC provenance carrying Miasma stealers
- **What stayed safe:** Hybrid Cloud Console (console.redhat.com: no release in window and install scripts stripped), ROSA, ARO, OSD, ACS Cloud Service, AAP Managed, and all shipped Red Hat enterprise products

## Summary

On May 29, 2026, a Red Hat developer’s GitHub account compromised by a malicious VS Code extension pushed unauthorized commits into the RedHatInsights GitHub organization and altered config files to infect fellow developers opening those directories. The attacker used GitHub Actions OIDC Trusted Publishing to ship 32 compromised @redhat-cloud-services npm packages carrying Miasma ("Mini Shai-Hulud") preinstall stealers with valid provenance. Red Hat’s bulletin RHSB-2026-006 confirmed zero managed cloud services (ROSA, ARO, OSD) or enterprise products shipped affected builds.

## Attack sequence

1. **May 29, 2026 — Malicious VS Code extension compromises a developer’s GitHub account:** A developer installs a malicious VS Code extension that hijacks their GitHub account and access into the RedHatInsights GitHub organization.
2. **May 29–Jun 1, 2026 — Attacker pushes code and workspace traps into RedHatInsights repositories:** Unauthorized commits inject Miasma ("Mini Shai-Hulud") payloads and alter repo config files to infect other developers opening those directories locally.
3. **Jun 1–17, 2026 — OIDC Trusted Publishing ships 32 scoped npm packages before removal & closure:** Official CI publishes 32 @redhat-cloud-services packages with valid provenance across June 1–4; Red Hat revokes tokens, purges npm versions, verifies products clean, and closes June 17.

## How they got in

Switching from static npm tokens to GitHub Actions OIDC Trusted Publishing stops stolen tokens, but it does **not** stop an attacker who walks straight into the GitHub repo as a legitimate developer.

Red Hat's bulletin `RHSB-2026-006` details exactly how that happened on May 29, 2026. A developer's workstation installed a malicious VS Code extension, handing attackers control of their GitHub account. Using that account, the intruder pushed unauthorized commits into repositories inside the `RedHatInsights` GitHub organization and even poisoned repository configuration files to infect any other developer who opened those folders locally.

## What it reached

Because the malicious commits landed inside the trusted GitHub organization, Red Hat's own GitHub Actions OIDC Trusted Publishing pipeline happily built and published **32 scoped packages** under `@redhat-cloud-services` (including `@redhat-cloud-services/frontend-components`, `rbac-client`, `insights-client`, and `types`, totaling 96 versions across June 1 and June 4 waves) carrying **valid SLSA provenance attestations**.

Inside those packages rode the open-source credential-stealer kit known as **Miasma** (also called "Mini Shai-Hulud"), running a `preinstall` hook designed to harvest cloud tokens, SSH keys, and GitHub secrets from developer laptops and CI runners. Red Hat contained the VS Code extension on June 1, revoked user and automation tokens, fixed push-protection rules, removed all malicious versions from npm, and closed the incident on June 17.

## What stayed safe

Red Hat's layered production controls proved their worth. First, the affected packages were internal frontend libraries built strictly for Hybrid Cloud Console (`console.redhat.com`) development, and no Console release shipped during the compromise window. Second, Red Hat's deployment pipeline automatically strips installation-time scripts before deploying to `console.redhat.com`. Third, despite the similar name, zero Red Hat-managed cloud services (ROSA, ARO, OSD, ACS Cloud Service, AAP Managed) and zero shipped Red Hat enterprise products contained compromised builds.

## How to defend against this

- **Allowlist IDE extensions** (Stops step 1): Enforce managed VS Code extension allowlists and Workspace Trust prompts so unvetted plugins or poisoned .vscode workspace configs cannot execute silently on developer laptops.
- **Enforce push protection** (Stops step 2): Block direct pushes and orphan-commit bypasses on release branches, requiring signed commits and independent second-party review before CI can publish.
- **Strip install scripts** (Stops step 3): Follow Red Hat’s own Console defense: strip package install-time scripts in build pipelines and require human 2FA approval gates even when using OIDC Trusted Publishing.

## Evidence log

| Section | Claim | Evidence state | Source |
| --- | --- | --- | --- |
| How they got in | On May 29, 2026, a GitHub account compromised by a malicious VS Code extension pushed unauthorized commits into RedHatInsights repositories and modified config files to infect other developers opening those directories | Confirmed | Red Hat Security Bulletin RHSB-2026-006, Jul 2, 2026 |
| What it reached | 32 npm packages under @redhat-cloud-services (frontend libraries for console.redhat.com) were published carrying Miasma ("Mini Shai-Hulud") malware using GitHub OIDC Trusted Publishing | Confirmed | Red Hat RHSB-2026-006 and supply-chain telemetry |
| What held | No console.redhat.com release shipped during the window, Red Hat’s build pipeline strips install-time scripts before deployment, and ROSA, ARO, OSD, ACS Cloud, AAP Managed, and all shipped Red Hat products were unaffected | Confirmed | Red Hat Security Bulletin RHSB-2026-006, Jul 2, 2026 |

## Indicators of compromise

- **Advisory:** `RHSB-2026-006` (undefined)
- **Scope:** `@redhat-cloud-services/* (32 packages)` (undefined)

---
Published by [breachidents](https://breachidents.com). Preserve evidence labels (Confirmed / Inferred / Withheld by vendor / Observed) when citing.
