ReversingLabs identified a coordinated supply chain attack against the @redhat-cloud-services npm scope in which 32 malicious package versions were published in 72 seconds, affecting about 9.8 million downloads. The payload used layered obfuscation, installed a bun-based credential stealer during npm install, and may have enabled further package propagation through stolen npm credentials. #RedHatCloudServices #bun #GitHubActions #AWS #Azure #GoogleCloud #HashiCorpVault #npm #obfuscatorio
Keypoints
- 32 packages in the @redhat-cloud-services npm scope were compromised in a 72-second publishing burst on June 1, 2026.
- The malicious versions collectively account for approximately 9.8 million total downloads across Red Hatâs Hybrid Cloud Console JavaScript ecosystem.
- Each affected package was modified in the same way: package.json gained a preinstall script and index.js was replaced with a malicious loader.
- The attack used a multi-layer design involving ROT-N encoding, AES-128-GCM decryption, and an obfuscated payload generated with obfuscator.io.
- The main payload is a credential stealer targeting AWS, Azure/ARM, Google Cloud, HashiCorp Vault, GitHub, npm, and SSH data.
- The payload can detect GitHub Actions environments and exfiltrate stolen data through the GitHub API, suggesting CI/CD-focused targeting.
- The malware includes worm-like propagation logic that could publish new malicious package versions using stolen npm credentials.
MITRE Techniques
- [T1059.007] Command and Scripting Interpreter: JavaScript â The attack runs malicious JavaScript through package installation and later executes the decrypted payload with Bun (âthe packageâs main entry point is completely replaced with a malicious payloadâ, âit is used directlyâ).
- [T1204.002] User Execution: Malicious File â The preinstall script causes execution during npm install, so the malicious code runs when developers install dependencies (âpreinstall script entry is addedâ, âduring any npm install runâ).
- [T1027] Obfuscated Files or Information â The payload is hidden with ROT-N, AES-128-GCM, and obfuscator.io layers (âobfuscated preinstall malwareâ, âheavily obfuscated using the obfuscator.io toolchainâ).
- [T1027.013] Obfuscated Files or Information: Encrypted/Encoded File â The malware stores encrypted blobs and decodes them at runtime using AES-128-GCM and ROT-N (âdecrypts two encrypted blobsâ, ârotation value N differs per packageâ).
- [T1140] Deobfuscate/Decode Files or Information â The code reconstructs and decodes the payload from character codes and encrypted blobs before execution (âString.fromCharCode reconstructs a stringâ, âdecryption of the chrome package payloadâ).
- [T1056.001] Input Capture: Keylogging â Not a traditional keylogger, but it harvests credential material from environment variables, token files, and SSH data (âAWS_ACCESS_KEY_IDâ, âGITHUB_TOKENâ, â~/.ssh/â).
- [T1552.001] Unsecured Credentials: Credentials In Files â It reads credentials from files such as ~/.npmrc, SSH files, and cloud credential files (â~/.npmrcâ, â~/.ssh/â, âapplication default credential filesâ).
- [T1552.004] Unsecured Credentials: Private Keys â The malware targets SSH material and other secret-bearing files that can contain private key data (â~/.ssh/â).
- [T1528] Steal Application Access Token â It targets GitHub tokens and workflow-related secrets from development environments (âGITHUB_TOKENâ, âGITHUB_WORKFLOW_REFâ).
- [T1105] Ingress Tool Transfer â The malware downloads the Bun runtime from GitHub before executing the main payload (âdownloads the bun runtime (v1.3.13) from github.com/oven-sh/bun/releasesâ).
- [T1071.001] Application Layer Protocol: Web Protocols â Stolen data is exfiltrated via the GitHub API and HTTP connections (âexfiltrated via the GitHub APIâ, âConnects through HTTPâ).
- [T1057] Process Discovery â It checks for GitHub Actions context by inspecting environment variables to determine where it is running (âchecks GITHUB_REPOSITORY and GITHUB_WORKFLOW_REFâ).
- [T1547.001] Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder â The preinstall script creates automatic execution during installation, acting as an execution persistence mechanism within the build process (âpreinstall scriptâ).
- [T1218.011] System Binary Proxy Execution: Rundll32 â Not applicable; no evidence in the article.
- [T1203] Exploitation for Client Execution â Not mentioned; the attack relies on package installation rather than exploitation.
- [T1106] Native API â The payload uses Node.js crypto APIs to decrypt and run encrypted content (âcreateDecipheriv(âaes-128-gcmâ)â).
- [T1036] Masquerading â The attack blends into legitimate package and runtime behavior by using a real Bun release from an official GitHub repository (âlegitimate binary from a legitimate sourceâ).
Indicators of Compromise
- [SHA-256 ] malicious index.js files â 21b6409a7b84446310daca5409ad6112ac60a1e4bef97736e53fff5f63bfdef4, 5c6cb758a3447bc7e0de34406919a933f9351e90ef04ec43f3bbb401e7004e1b, and 2 more hashes
- [Package versions ] compromised npm versions â @redhat-cloud-services/chrome 2.3.1, @redhat-cloud-services/types 3.6.1, and other 30 malicious versions
- [Package names ] affected packages â @redhat-cloud-services/frontend-components, @redhat-cloud-services/frontend-components-utilities, and other 30 packages
- [URLs ] runtime download source â github.com/oven-sh/bun/releases, GitHub API endpoints used for exfiltration
- [Environment variables ] credential targets â AWS_ACCESS_KEY_ID, GITHUB_TOKEN, and other cloud or CI/CD secrets such as AZURE_VAULT_NAME and GITHUB_WORKFLOW_REF
- [File paths ] local secret locations â ~/.npmrc, ~/.ssh/, and cloud credential files used by the payload
Read more: https://www.reversinglabs.com/blog/red-hat-cloud-service-npm-packages-backdoored-in-72-seconds