Red Hat NPM Packages Hijacked to Steal Cloud Credentials

Article Highlights
Off On

The discovery of a sophisticated supply chain attack targeting the official Red Hat cloud services namespace has sent shockwaves through the global DevOps community as security researchers uncover a massive breach involving over thirty compromised packages. This incident, which occurred on June 1, 2026, marks a significant escalation in the complexity of package repository threats, moving far beyond traditional typosquatting techniques. Instead of relying on users making spelling mistakes, the threat actors managed to hijack legitimate namespaces by compromising GitHub Actions OIDC tokens, allowing them to push malicious updates directly into the @redhat-cloud-services repository. This breach bypasses traditional trust mechanisms and underscores a critical vulnerability in modern automated deployment pipelines that rely on federated identity. Organizations worldwide now face the daunting task of auditing their environments for the presence of the “Miasma” malware family, which was deployed under the guise of routine dependency updates.

1. Incident Overview: Entry Mechanics and Attribution

Security analysts have officially linked this coordinated assault to the threat group known as TeamPCP, who deployed a highly advanced iteration of the Mini Shai-Hulud malware family. This new variant, aptly named “MiasmThe Spreading Blight,” demonstrates a level of operational maturity rarely seen in previous repository attacks. By specifically targeting the GitHub Actions OIDC tokens, the attackers successfully impersonated legitimate maintainers, ensuring that the malicious code carried the weight of official verification. This method of entry is particularly devastating because it circumvents standard security protocols like multi-factor authentication for individual developers, focusing instead on the automated systems that govern the delivery of software. The precision of the attack suggests that the actors spent months conducting reconnaissance on Red Hat’s internal build systems before initiating the hijack on the first of June. The technical execution of the infection relies heavily on the use of preinstall hooks embedded within the package.json file of the compromised modules. When a developer or a continuous integration system attempts to install one of the affected @redhat-cloud-services packages, the malicious code executes automatically before any legitimate software components are even loaded. To evade contemporary signature-based detection systems, the payload is delivered as a 4.2 MB obfuscated file that employs multi-stage decryption routines. Once the initial wrapper is unpacked, the malware drops a specialized Bun-based script into temporary directories to facilitate high-speed data collection. The choice of the Bun runtime is significant, as its high performance and built-in utilities allow the malware to scan large file systems and network environments much faster than traditional Node.js scripts, all while maintaining a relatively small footprint.

2. Technical Execution: Data Theft and Infrastructure Targets

Once the Miasma malware establishes its presence within a development environment, it initiates a comprehensive harvest of sensitive authentication material across multiple platforms. The primary targets include credentials for GitHub, npm, and PyPI, which provides the attackers with the necessary leverage to expand the scope of the supply chain compromise. Beyond simple repository access, the script actively hunts for high-value cloud infrastructure secrets, specifically targeting AWS access keys, Azure service principals, and Google Cloud Platform service account files. By extracting these identities, the threat actors can gain programmatic access to an organization’s entire cloud footprint, potentially leading to unauthorized resource provisioning or data exfiltration. The automated nature of this theft ensures that even ephemeral environments are stripped of their secrets within seconds of a compromised package installation. The depth of the data collection extends into the very core of modern DevOps operations by extracting Kubernetes configuration files and HashiCorp Vault tokens. The malware is designed to recognize the specific structures of SSH private keys and various internal secrets that facilitate automated server management. Furthermore, the script is capable of directly querying cloud-native secret management services if the environment possesses the requisite IAM permissions. It attempts to communicate with AWS Secrets Manager and Azure Key Vault to pull down additional sensitive parameters that are not stored locally on the disk. This approach allows the attackers to pivot from a single compromised developer machine to the most secure layers of an enterprise’s infrastructure. The breadth of these collection targets suggests that the primary goal of TeamPCP is long-term corporate espionage and the total subversion of cloud-based development workflows.

3. Stealth Strategies: Persistence and Evasion Techniques

To maintain a long-term presence on compromised systems, the Miasma malware utilizes a variety of network camouflage techniques to blend in with legitimate developer activity. All outbound traffic containing stolen data is cleverly disguised as standard API requests to an Anthropic endpoint, making it appear as though the user is simply interacting with an AI language model. This exfiltration method is paired with a dead-drop strategy where stolen data is uploaded to public GitHub repositories newly created on the victim’s own account. By hosting the stolen secrets on legitimate infrastructure already associated with the target, the attackers reduce the likelihood of triggering anomaly detections based on suspicious domain traffic. This sophisticated layering of deception ensures that even organizations with robust network monitoring may overlook the illicit flow of data for an extended period. Persistence is further reinforced through the installation of background monitoring services that are compatible with both Linux and macOS operating systems. These services are designed to restart automatically and can even survive certain system updates, providing the threat actors with a permanent backdoor into the development environment. In an alarming move, the malware also attempts to hook into modern development tools, such as VS Code and AI coding assistants like Claude and Copilot. By injecting malicious tasks and modifying the behavior of these AI helpers, the attackers can influence the code being written by developers in real-time. This level of IDE-level integration allows the malware to propagate itself into new projects as they are being created, effectively turning the developer’s own productivity tools against the integrity of the entire software organization.

4. Remediation Steps: Recovery and Long-Term Security

The discovery of the “gh-token-monitor” service reveals a ruthless dead-man switch designed to discourage security researchers and developers from revoking stolen credentials. This specific background process continuously monitors the validity of the exfiltrated GitHub tokens to ensure they remain active for the attacker’s use. If a user identifies the breach and cancels a compromised token before the malware is fully eradicated from the host machine, the script is programmed to execute a retaliatory command. This destructive safeguard may result in the complete deletion of the user’s entire home directory, causing catastrophic data loss. This aggressive tactic forces a paradigm shift in incident response, requiring victims to prioritize the total isolation and cleaning of their hardware before taking the standard step of resetting passwords or rotating API keys. To properly recover from this incident, security teams implemented a rigorous protocol that began with the immediate deletion of all impacted @redhat-cloud-services packages. Administrators rebuilt their project lockfiles using clean metadata from trusted mirrors to ensure that no remnants of the malicious versions remained in the dependency tree. It was essential to execute the “ignore scripts” command in all CI pipelines to prevent any automatic code execution during the build process while the environment was still under investigation. Technicians located and erased the monitoring files on all affected machines prior to initiating any credential rotations to prevent the dead-man switch from triggering. Finally, build systems were completely formatted and reinstalled from safe images to guarantee that the environment was free of any hidden persistence mechanisms or unauthorized IDE injections.

Explore more

Leadership Disconnect Threatens Front-Line Worker Retention

Ling-Yi Tsai is a seasoned veteran in the HR technology space, having spent decades helping major organizations navigate the complex intersection of human potential and digital transformation. As an expert in HR analytics and talent management, she has witnessed how the right tools can either bridge gaps or, if mismanaged, widen the chasm between the boardroom and the front-line worker.

Is Your Network Safe From Active GlobalProtect Exploits?

Dominic Jainy is a seasoned IT professional whose expertise at the intersection of network security and advanced infrastructure makes him a vital voice in the cybersecurity community. With a deep understanding of how vulnerabilities in enterprise software can be weaponized, he offers a unique perspective on the recent high-severity warnings issued regarding PAN-OS. This conversation explores the rapid escalation of

Stockland Proposes 250MW Data Center Campus in Melbourne

The steady hum of heavy-duty diesel engines that once echoed through Brooklyn’s industrial corridors is being replaced by the silent, high-frequency vibration of server racks processing the nation’s digital future. This transformation at the 22-hectare Brooklyn Distribution Centre on Francis Street signals a pivotal shift for Stockland, moving from traditional logistics toward high-capacity digital infrastructure. Replacing three massive warehouses with

AI-Powered Music Visualization – Review

The traditional paradigm of music visualization has long been confined to mechanical oscillators and rhythmic pulses that lack the emotional nuance required to truly complement a complex live performance. Historically, the relationship between sound and sight was dictated by simple amplitude thresholds, where a louder beat simply triggered a brighter flash. However, the emergence of generative artificial intelligence has catalyzed

Legacy Investing to Build 50MW AI Data Center in Texas

Introduction The relentless expansion of artificial intelligence requires a massive amount of physical infrastructure to support the complex computations that drive modern digital transformation toward the future. Legacy Investing recently announced a 50MW project in Marion, Texas, to meet this demand. Readers will explore the technical specifications and strategic location of the new facility. The discussion covers land-use transitions and