A coordinated malware campaign has compromised more than 20 npm packages, targeting developer workstations and continuous integration (CI) environments with a self-propagating worm designed to harvest sensitive credentials. The attack, dubbed Miasma, was executed in under three seconds on 24 June 2026, according to Microsoft Threat Intelligence, which identified the incident as part of an ongoing evolution of supply-chain threats in the JavaScript ecosystem.
The attackers gained access to the npm account of a maintainer identified as "czirker" and used it to publish poisoned versions of legitimate packages used by the Leo Platform and RStreams frameworks. Unlike earlier variants of Miasma, which relied on npm installation hooks, this version conceals its payload elsewhere in the installation process and leverages the Bun JavaScript runtime instead of Node.js, likely to evade detection by security tools.
How the attack unfolded
Microsoft’s analysis revealed that the malware operates in two phases. First, it scans infected systems for credentials, including those for AWS, Azure, and Google Cloud, as well as GitHub personal access tokens, Kubernetes secrets, HashiCorp Vault credentials, 1Password data, and npm publishing credentials. Instead of transmitting stolen data to a traditional command-and-control server, the malware commits it to a GitHub repository created under the victim’s account, further obscuring its activity.
In the second phase, the malware attempts to republish any packages the victim maintains, bypassing npm’s two-factor authentication requirements. This tactic not only extends the attack’s reach but also creates a persistent foothold in the supply chain. Sonatype, which also tracked the campaign, noted that the malware’s ability to propagate through legitimate package updates makes it particularly difficult to eradicate.
- Attack began late 24 June 2026, compromising over 20 npm packages in under three seconds.
- Targets include cloud credentials, GitHub tokens, Kubernetes secrets, and 1Password data.
- Malware uses GitHub repositories to exfiltrate stolen data, avoiding traditional C2 servers.
- Earlier Miasma variants surfaced in poisoned Red Hat npm packages earlier in June 2026.
- Mini Shai-Hulud toolkit, released on GitHub, has made the malware accessible to other attackers.
Impact and mitigation
Organizations using affected packages are advised to assume that developer machines and CI environments may have been compromised. Sonatype recommends a thorough audit of dependency lockfiles, internal package mirrors, build caches, container images, and CI runners to identify and remove lingering copies of the malicious releases. Credential rotation is critical, but experts warn that simply replacing secrets may not be sufficient if the attackers retain access to the compromised environment.
The Miasma campaign has demonstrated a troubling ability to adapt. Its shift from Node.js to Bun, for example, suggests an effort to evade detection by security software that may not yet monitor the newer runtime as closely. The release of the Mini Shai-Hulud toolkit on GitHub has also lowered the barrier for other attackers to deploy similar malware, raising concerns about a potential surge in copycat attacks.
- Audit all npm dependencies and CI pipelines for signs of the malicious packages.
- Rotate credentials for cloud providers, GitHub, and other sensitive services, but ensure the environment is clean before doing so.
- Monitor for unusual GitHub repository activity, as the malware uses victim accounts to exfiltrate data.
Broader implications
The incident underscores the growing sophistication of supply-chain attacks targeting open-source ecosystems. Unlike traditional malware, which often relies on phishing or social engineering, Miasma exploits the trust inherent in package registries and maintainer accounts. The attack’s speed—completed in under three seconds—highlights the challenges of detecting and mitigating such threats in real time.
Microsoft and Sonatype have both emphasized the need for heightened vigilance among developers and DevOps teams. The use of GitHub repositories for data exfiltration, rather than external servers, complicates detection efforts, as the activity may blend in with legitimate workflows. As the malware continues to evolve, organizations are urged to adopt stricter access controls, multi-factor authentication for package publishing, and automated dependency scanning to reduce their exposure to similar threats.
Automated pipeline · Security
Synthesized from 1 industry feed on 26 Jun 2026. Passed independent editor verification (score 85/100) before publication. Style guide v1.3.
Sources
Decision trail
- Checking for duplicates — New story No recent or in-pipeline article covers the Miasma npm package poisoning campaign.
- Checking for duplicates — New story pre_write:; No recent or in-pipeline article covers this specific npm package poisoning campaign.
- Writing the article — Draft created article_id=256 slug=miasma-malware-infects-20-npm-packages-in-3-second-attack
-
Editor review — Approved
- Score: 85/100
- Factual grounding: The draft states '24 June 2026' as the attack date, which matches the source ('late on June 24'). However, the source does not specify the year, and the reference date is 26 June 2026. While the year is plausible, it is not explicitly confirmed in the source. This is treated as minor because the date is otherwise consistent with the source's timeline.
- Style compliance: The body length (680 words) is within the 300-700 word range, but it is close to the upper limit for a story with sparse additional context. The draft could be tightened slightly to avoid padding, though this is not material.
- No copied phrasing: The draft paraphrases well overall, but the phrase 'AWS, Azure, and Google Cloud credentials alongside GitHub personal access tokens, Kubernetes secrets, HashiCorp Vault credentials, 1Password data, npm publishing credentials' closely mirrors the source's wording. While the facts are correct, the phrasing should be restructured further to avoid echoing the source.
- Style compliance: The 'Key facts' block includes 'Earlier Miasma variants surfaced in poisoned Red Hat npm packages earlier in June 2026.' The source states 'earlier this month,' which resolves to June 2026 given the publication date. However, the specific day is unclear, and the draft should avoid implying precision (e.g., 'earlier in June').
- Generating reader Q&A — Generated 5 items
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 5 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 5 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 5 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 5 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 5 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 5 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 5 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 3 relations from 191 candidates
- Linking related stories — Linked 2 relations from 191 candidates
- Linking related stories — Linked 4 relations from 191 candidates
- Assigning hero image — Reused library image reused image #2
- Linking related stories — Linked 5 relations from 191 candidates
- Linking related stories — Linked 5 relations from 192 candidates
- Linking related stories — Linked 2 relations from 193 candidates
- Linking related stories — Linked 4 relations from 193 candidates
- Linking related stories — Linked 3 relations from 195 candidates
- Linking related stories — Linked 4 relations from 195 candidates
- Linking related stories — Linked 3 relations from 196 candidates
- Linking related stories — Linked 4 relations from 197 candidates
- Linking related stories — Linked 3 relations from 198 candidates
- Linking related stories — Linked 4 relations from 198 candidates
- Linking related stories — Linked 2 relations from 199 candidates
- Linking related stories — Linked 3 relations from 200 candidates
- Linking related stories — Linked 2 relations from 201 candidates
- Linking related stories — Linked 4 relations from 201 candidates
- Linking related stories — Linked 3 relations from 202 candidates
- Linking related stories — Linked 4 relations from 203 candidates
- Linking related stories — Linked 3 relations from 204 candidates
- Linking related stories — Linked 3 relations from 204 candidates
- Linking related stories — Linked 3 relations from 205 candidates
- Linking related stories — Linked 3 relations from 206 candidates
- Linking related stories — Linked 4 relations from 207 candidates
- Linking related stories — Linked 4 relations from 207 candidates
- Publishing — Published miasma-malware-infects-20-npm-packages-in-3-second-attack
- Mastodon — Posted https://mstdn.social/@hostingpaper/116835141671537717

Discussion · coming soon
Be the first to join the thread when community discussion launches.