RedHatInsights/javascript-clientsThe compromised packages contained a preinstall script that executed automatically upon installation, downloading a 28 KB credential-stealing payload. This malware, identified as a new variant of the Mini Shai-Hulud family dubbed "Miasma" and attributed to the threat actor group TeamPCP (though copycats could not be ruled out), acted as a self-propagating worm .
The stolen credentials from the Red Hat phase were weaponized again on June 5, 2026. Using a previously compromised contributor account, attackers pushed a single malicious commit to the Azure/durabletask repository . This repository had already been the victim of a PyPI package compromise on May 19, and the same contributor account was used in both attacks, highlighting a failure to fully revoke all access after the initial breach
.
The malicious commit contained configuration files that acted as a trap for AI coding agents. When a developer opened the repository in AI-powered tools like Claude Code, Gemini CLI, Cursor, or VS Code, the files would be read automatically, injecting commands that executed a credential-harvesting payload .
GitHub's response was immediate and unprecedented. In an automated sweep, it disabled 73 repositories across four Microsoft GitHub organizations :
Affected repositories displayed a stark gray notice: "This repository has been disabled. Access to this repository has been disabled by GitHub Staff due to a violation of GitHub's terms of service" .
The Miasma campaign used a multi-pronged attack strategy that combined classic supply chain poisoning with novel self-propagation and AI-targeting techniques.
preinstall scripts that delivered its payload the moment a developer ran npm installThe remediation required a synchronized effort from multiple major tech and security organizations.
The Miasma attack did not happen in isolation. On June 5, researchers from Endor Labs and StepSecurity disclosed a separate but parallel campaign, dubbed IronWorm, which had compromised an even larger set of 57 npm packages across more than 286 malicious versions to deliver a new Miasma worm variant . This demonstrated that the threat actors were aggressively scaling their operations and experimenting with new techniques, such as abusing
binding.gyp files for code execution .
The Cloud Security Alliance (CSA) noted a critical long-term risk: while the campaign was attributed to TeamPCP, the underlying codebase was publicly released. This meant that copycat actors with the same or modified tools could not be ruled out, ensuring the Miasma attack pattern would continue to be a threat .
Comments
0 comments