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

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.

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.

Developer IDERedHatInsights & npmDownstream installsStayed safeMalicious VS Code extStole GitHub accountRedHatInsights reposOrphan commits & configs32 @redhat-cloud-servicesValid OIDC provenanceMiasma preinstall hookSwept dev & CI credsConsole & managed cloudsInstall scripts stripped123
1May 29, 2026

A developer installs a malicious VS Code extension that hijacks their GitHub account and access into the RedHatInsights GitHub organization.

ConfirmedWhere to stop it: allowlist IDE extensions
  1. May 29, 2026

    A developer installs a malicious VS Code extension that hijacks their GitHub account and access into the RedHatInsights GitHub organization.

    Malicious VS Code exttoRedHatInsights repos
  2. May 29–Jun 1, 2026

    Unauthorized commits inject Miasma ("Mini Shai-Hulud") payloads and alter repo config files to infect other developers opening those directories locally.

    RedHatInsights reposto32 @redhat-cloud-services
  3. Jun 1–17, 2026

    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.

    32 @redhat-cloud-servicestoMiasma preinstall hook

Figure 1. How the attack unfolded, and what stayed isolated. Select any step or box for details.

What they took

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

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

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

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.

vscode-hardening.json

Enforce VS Code Workspace Trust and disable automatic extension updates on engineering workstations.

{  "security.workspace.trust.enabled": true,  "security.workspace.trust.startupPrompt": "always",  "extensions.autoUpdate": false,  "task.allowAutomaticTasks": "off"}

Appendix

Evidence log: what’s confirmed and what’s withheld3 claims
ClaimStatusSource
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 directoriesConfirmedRed Hat Security Bulletin RHSB-2026-006, Jul 2, 2026
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 PublishingConfirmedRed Hat RHSB-2026-006 and supply-chain telemetry
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 unaffectedConfirmedRed Hat Security Bulletin RHSB-2026-006, Jul 2, 2026
Indicators of compromise2 indicators
  • RHSB-2026-006

  • @redhat-cloud-services/* (32 packages)

Reproduction labVS Code policy JSON, MIT license

Verify developer workstations disable automatic VS Code tasks on folder open and scan lockfiles for @redhat-cloud-services versions published June 1–4, 2026.

Safety note: Read-only IDE settings and lockfile check.

grep -rn "@redhat-cloud-services/" package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null || echo "No @redhat-cloud-services packages found"
Red Hat: a malicious VS Code extension poisoned 32 @redhat-cloud-services npm packages with valid OIDC provenance | breachidents