{"incident":{"slug":"redhat-jun-2026-cloud-services-npm","caseId":"BI-2026-032","organization":"Red Hat","title":"Red Hat: a malicious VS Code extension poisoned 32 @redhat-cloud-services npm packages with valid OIDC provenance","shortSummary":"A developer’s GitHub account compromised by a malicious VS Code extension pushed Miasma malware into 32 @redhat-cloud-services npm packages, but build-pipeline script stripping kept Red Hat products and managed clouds clean.","lede":"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.","incidentDate":"May 29–Jun 4, 2026","incidentDateIso":"2026-05-29","incidentEndIso":"2026-06-04","disclosedDate":"Jun 1, 2026","sourceUrl":"https://access.redhat.com/security/vulnerabilities/RHSB-2026-006","sourceAuthor":"Red Hat Product Security Bulletin (RHSB-2026-006)","vectorFilter":"CI supply chain","timeToDetect":"3 days (May 29 intrusion disclosed & VS Code extension contained Jun 1)","detectedBy":"Red Hat engineering and security researchers","initialAccess":{"label":"Malicious VS Code extension -> GitHub account","detail":"A developer’s GitHub account compromised by a malicious VS Code extension pushed unauthorized commits into RedHatInsights repos","evidence":"confirmed"},"blastRadius":"32 scoped @redhat-cloud-services npm packages (96 malicious versions across Jun 1 & Jun 4 waves)","whatItReachedShort":"RedHatInsights GitHub repos, altered developer config files, and 32 @redhat-cloud-services frontend npm packages published with valid OIDC provenance carrying Miasma stealers","whatHeldShort":"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","revisions":[{"id":"Rev A","date":"Jul 2, 2026","note":"Published from Red Hat Security Bulletin RHSB-2026-006 (disclosed June 1, closed June 17, updated July 2, 2026)."}],"bodyMarkdown":"## How they got in\n\nSwitching 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.\n\nRed 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.\n\n## What it reached\n\nBecause 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**.\n\nInside 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.\n\n## What held\n\nRed 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.\n\n> **Why this matters for defenders**\n>\n> OIDC Trusted Publishing proves a package came from your CI pipeline, not that the commit entering CI was honest. Lock down developer IDEs with managed extension allowlists and disabled automatic folder tasks (`task.allowAutomaticTasks: \"off\"`), enforce two-person branch protection on release branches, and strip install scripts before deployment.","narrative":{"howTheyGotIn":["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."],"whatItReached":["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."],"whatHeld":["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."],"sideNoteTitle":"Why this matters for defenders","sideNoteParagraphs":["OIDC Trusted Publishing proves a package came from your CI pipeline, not that the commit entering CI was honest. Lock down developer IDEs with managed extension allowlists and disabled automatic folder tasks (`task.allowAutomaticTasks: \"off\"`), enforce two-person branch protection on release branches, and strip install scripts before deployment."]},"claims":[{"group":"How they got in","claim":"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","evidence":"confirmed","source":"Red Hat Security Bulletin RHSB-2026-006, Jul 2, 2026"},{"group":"What it reached","claim":"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","evidence":"confirmed","source":"Red Hat RHSB-2026-006 and supply-chain telemetry"},{"group":"What held","claim":"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","evidence":"confirmed","source":"Red Hat Security Bulletin RHSB-2026-006, Jul 2, 2026"}],"diagram":{"label":"How a malicious VS Code extension hijacked a Red Hat GitHub account and abused OIDC Trusted Publishing","zones":[{"id":"ext","label":"Developer IDE","kind":"boundary","lane":0},{"id":"gh","label":"RedHatInsights & npm","kind":"boundary","lane":1},{"id":"dev","label":"Downstream installs","kind":"boundary","lane":2},{"id":"safe","label":"Production & managed cloud","kind":"isolated","lane":2}],"nodes":[{"id":"rh-ide","zone":"ext","name":"Malicious VS Code ext","detail":"Stole GitHub account","kind":"attacker","ev":"confirmed","at":0,"when":"May 29, 2026","steps":[1],"ctl":["rh-k1"],"story":"A malicious VS Code extension compromised a developer’s GitHub account on May 29, 2026 (contained June 1)."},{"id":"rh-gh","zone":"gh","name":"RedHatInsights repos","detail":"Orphan commits & configs","kind":"compromised","ev":"confirmed","at":1,"when":"May 29–Jun 1, 2026","steps":[1,2],"ctl":["rh-k2"],"story":"Using the hijacked GitHub account, the attacker pushed unauthorized orphan commits into RedHatInsights repos and altered workspace config files to infect other developers opening those folders."},{"id":"rh-npm","zone":"gh","name":"32 @redhat-cloud-services","detail":"Valid OIDC provenance","kind":"compromised","ev":"confirmed","at":2,"when":"Jun 1–4, 2026","steps":[2,3],"ctl":["rh-k3"],"story":"Because the commits triggered official GitHub Actions OIDC Trusted Publishing, 32 scoped npm packages (96 versions) shipped to npm carrying valid SLSA provenance and Miasma preinstall stealers."},{"id":"rh-steal","zone":"dev","name":"Miasma preinstall hook","detail":"Swept dev & CI creds","kind":"compromised","ev":"confirmed","at":3,"when":"Jun 1–4, 2026","steps":[3],"story":"The Miasma (\"Mini Shai-Hulud\") preinstall script targeted developer and CI cloud tokens, SSH keys, and GitHub secrets on machines installing those frontend packages."},{"id":"rh-safe","zone":"safe","name":"Console & managed clouds","detail":"Install scripts stripped","kind":"isolated","ev":"confirmed","at":0,"when":"Not reached","story":"No console.redhat.com release shipped during the window, Red Hat strips install-time scripts before deploy, and ROSA, ARO, OSD, ACS Cloud, AAP Managed, and all shipped Red Hat products stayed clean."}],"edges":[{"id":"rhe1","from":"rh-ide","to":"rh-gh","kind":"attack","step":1},{"id":"rhe2","from":"rh-gh","to":"rh-npm","kind":"attack","step":2},{"id":"rhe3","from":"rh-npm","to":"rh-steal","kind":"attack","step":3}],"steps":[{"n":1,"time":"May 29, 2026","short":"May 29 VS Code","text":"Malicious VS Code extension compromises a developer’s GitHub account","say":"A developer installs a malicious VS Code extension that hijacks their GitHub account and access into the RedHatInsights GitHub organization."},{"n":2,"time":"May 29–Jun 1, 2026","short":"Orphan commits","text":"Attacker pushes code and workspace traps into RedHatInsights repositories","say":"Unauthorized commits inject Miasma (\"Mini Shai-Hulud\") payloads and alter repo config files to infect other developers opening those directories locally."},{"n":3,"time":"Jun 1–17, 2026","short":"32 npm packages","text":"OIDC Trusted Publishing ships 32 scoped npm packages before removal & closure","say":"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."}],"controls":[{"id":"rh-k1","step":1,"kind":"control","nodeId":"rh-ide","name":"Allowlist IDE extensions","tag":"Stops step 1","long":"Enforce managed VS Code extension allowlists and Workspace Trust prompts so unvetted plugins or poisoned .vscode workspace configs cannot execute silently on developer laptops."},{"id":"rh-k2","step":2,"kind":"control","nodeId":"rh-gh","name":"Enforce push protection","tag":"Stops step 2","long":"Block direct pushes and orphan-commit bypasses on release branches, requiring signed commits and independent second-party review before CI can publish."},{"id":"rh-k3","step":3,"kind":"control","nodeId":"rh-npm","name":"Strip install scripts","tag":"Stops step 3","long":"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."}],"detectedAt":{"time":"Jun 1, 2026 (closed Jun 17, 2026)","short":"Jun 1 (3d)","text":"Red Hat disclosed RHSB-2026-006 on June 1, contained the malicious VS Code extension, revoked user and automation tokens, purged all 32 affected packages, and closed the incident June 17."}},"plate":{"W":849,"H":380,"label":"How a malicious VS Code extension hijacked a Red Hat GitHub account and abused OIDC Trusted Publishing","zones":[{"id":"ext","label":"Developer IDE","kind":"boundary","x":8,"y":16,"w":231,"h":110},{"id":"gh","label":"RedHatInsights & npm","kind":"boundary","x":277,"y":16,"w":269,"h":212},{"id":"dev","label":"Downstream installs","kind":"boundary","x":584,"y":16,"w":257,"h":110},{"id":"safe","label":"Production & managed cloud","kind":"isolated","x":584,"y":146,"w":257,"h":110}],"nodes":[{"id":"rh-ide","name":"Malicious VS Code ext","detail":"Stole GitHub account","kind":"attacker","ev":"confirmed","x":20,"y":52,"w":207,"at":0,"story":"A malicious VS Code extension compromised a developer’s GitHub account on May 29, 2026 (contained June 1).","when":"May 29, 2026","steps":[1],"ctl":["rh-k1"]},{"id":"rh-gh","name":"RedHatInsights repos","detail":"Orphan commits & configs","kind":"compromised","ev":"confirmed","x":289,"y":52,"w":245,"at":1,"story":"Using the hijacked GitHub account, the attacker pushed unauthorized orphan commits into RedHatInsights repos and altered workspace config files to infect other developers opening those folders.","when":"May 29–Jun 1, 2026","steps":[1,2],"ctl":["rh-k2"]},{"id":"rh-npm","name":"32 @redhat-cloud-services","detail":"Valid OIDC provenance","kind":"compromised","ev":"confirmed","x":289,"y":154,"w":245,"at":2,"story":"Because the commits triggered official GitHub Actions OIDC Trusted Publishing, 32 scoped npm packages (96 versions) shipped to npm carrying valid SLSA provenance and Miasma preinstall stealers.","when":"Jun 1–4, 2026","steps":[2,3],"ctl":["rh-k3"]},{"id":"rh-steal","name":"Miasma preinstall hook","detail":"Swept dev & CI creds","kind":"compromised","ev":"confirmed","x":604,"y":52,"w":216,"at":3,"story":"The Miasma (\"Mini Shai-Hulud\") preinstall script targeted developer and CI cloud tokens, SSH keys, and GitHub secrets on machines installing those frontend packages.","when":"Jun 1–4, 2026","steps":[3]},{"id":"rh-safe","name":"Console & managed clouds","detail":"Install scripts stripped","kind":"isolated","ev":"confirmed","x":596,"y":182,"w":233,"at":0,"story":"No console.redhat.com release shipped during the window, Red Hat strips install-time scripts before deploy, and ROSA, ARO, OSD, ACS Cloud, AAP Managed, and all shipped Red Hat products stayed clean.","when":"Not reached"}],"edges":[{"id":"rhe1","kind":"attack","step":1,"pts":[[227,81],[289,81]]},{"id":"rhe2","kind":"attack","step":2,"pts":[[412,110],[412,154]]},{"id":"rhe3","kind":"attack","step":3,"pts":[[534,183],[569,183],[569,81],[604,81]]}],"balloons":{"1":[258,81],"2":[412,132],"3":[569,132]},"noroute":[{"x1":546,"x2":584,"y":188,"label":"No route"}],"bps":[{"id":"rh-k1","step":1,"kind":"control","at":[258,81],"name":"Allowlist IDE extensions","tag":"Stops step 1","lead":[[258,70],[258,53],[270,53]],"lx":276,"ly":57,"anchor":"start","long":"Enforce managed VS Code extension allowlists and Workspace Trust prompts so unvetted plugins or poisoned .vscode workspace configs cannot execute silently on developer laptops.","nodeId":"rh-ide"},{"id":"rh-k2","step":2,"kind":"control","at":[412,132],"name":"Enforce push protection","tag":"Stops step 2","lead":[[412,143],[412,154],[424,154]],"lx":430,"ly":158,"anchor":"start","long":"Block direct pushes and orphan-commit bypasses on release branches, requiring signed commits and independent second-party review before CI can publish.","nodeId":"rh-gh"},{"id":"rh-k3","step":3,"kind":"control","at":[569,132],"name":"Strip install scripts","tag":"Stops step 3","lead":[[569,121],[569,104],[557,104]],"lx":551,"ly":108,"anchor":"end","long":"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.","nodeId":"rh-npm"}],"steps":[{"n":1,"time":"May 29, 2026","short":"May 29 VS Code","text":"Malicious VS Code extension compromises a developer’s GitHub account","say":"A developer installs a malicious VS Code extension that hijacks their GitHub account and access into the RedHatInsights GitHub organization."},{"n":2,"time":"May 29–Jun 1, 2026","short":"Orphan commits","text":"Attacker pushes code and workspace traps into RedHatInsights repositories","say":"Unauthorized commits inject Miasma (\"Mini Shai-Hulud\") payloads and alter repo config files to infect other developers opening those directories locally."},{"n":3,"time":"Jun 1–17, 2026","short":"32 npm packages","text":"OIDC Trusted Publishing ships 32 scoped npm packages before removal & closure","say":"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."}],"stripRows":[{"id":"sr-rh-ide","nodeId":"rh-ide","lineStyle":"solid"},{"id":"sr-step-1","nodeId":"rh-gh","step":1,"lineStyle":"solid","bpIds":["rh-k1"]},{"id":"sr-step-2","nodeId":"rh-npm","step":2,"lineStyle":"solid","bpIds":["rh-k2"]},{"id":"sr-step-3","nodeId":"rh-steal","step":3,"lineStyle":"none","bpIds":["rh-k3"]}],"detectedAt":{"time":"Jun 1, 2026 (closed Jun 17, 2026)","short":"Jun 1 (3d)","text":"Red Hat disclosed RHSB-2026-006 on June 1, contained the malicious VS Code extension, revoked user and automation tokens, purged all 32 affected packages, and closed the incident June 17."}},"codeArtifacts":[{"id":"rh-vscode-trust","filename":"vscode-hardening.json","language":"json","description":"Enforce VS Code Workspace Trust and disable automatic extension updates on engineering workstations.","code":"{\n  \"security.workspace.trust.enabled\": true,\n  \"security.workspace.trust.startupPrompt\": \"always\",\n  \"extensions.autoUpdate\": false,\n  \"task.allowAutomaticTasks\": \"off\"\n}\n"}],"reproductionLab":{"title":"VS Code Workspace Trust & npm audit","summary":"Verify developer workstations disable automatic VS Code tasks on folder open and scan lockfiles for @redhat-cloud-services versions published June 1–4, 2026.","bundleMeta":"VS Code policy JSON, MIT license","safetyNote":"Read-only IDE settings and lockfile check.","commands":"grep -rn \"@redhat-cloud-services/\" package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null || echo \"No @redhat-cloud-services packages found\"\n"},"iocs":[{"type":"Advisory","value":"RHSB-2026-006","note":"Official Red Hat Product Security Bulletin (disclosed Jun 1, closed Jun 17, 2026)","evidence":"confirmed"},{"type":"Scope","value":"@redhat-cloud-services/* (32 packages)","note":"Frontend Console npm libraries poisoned with Miasma (\"Mini Shai-Hulud\")","evidence":"confirmed"}],"publishedAt":"2026-06-17T18:00:00Z","origin":"editorial"}}