Security

AsyncAPI npm Supply Chain Attack: Import-Time Malware

3 min read

Summary

Microsoft Threat Intelligence uncovered a coordinated compromise of the AsyncAPI npm organization that republished five package versions with malicious code that runs when packages are imported, not just installed. The incident matters because common mitigations like npm install --ignore-scripts do not stop this technique, putting developer workstations, CI/CD pipelines, and production services at risk if they resolved the affected versions.

Need help with Security?Talk to an Expert

Introduction

Microsoft has disclosed a significant software supply chain incident affecting the @asyncapi npm organization. The attack is notable because the malicious payload executes at import/require time, which means standard defenses such as npm install --ignore-scripts are not enough to prevent compromise.

For IT and security teams, this raises the urgency of reviewing developer environments, CI/CD pipelines, container builds, and any production workloads that may have pulled the affected package versions.

What happened

On July 14, 2026, five malicious package versions across four AsyncAPI package names were republished:

According to Microsoft, the injected loader executed immediately when a poisoned package was imported. It then spawned a detached Node.js process that fetched a second-stage payload, sync.js, from IPFS.

How the attack worked

Microsoft traced the compromise back to a misconfigured GitHub Actions workflow using pull_request_target in the asyncapi/generator repository.

Key elements of the attack chain included:

  • A malicious pull request that executed untrusted code in a privileged workflow
  • Exposure of a bot personal access token used for unauthorized pushes
  • Abuse of legitimate GitHub OIDC trusted publishing workflows
  • Publication of packages with valid provenance signatures despite unauthorized source changes
  • Delivery of a Miasma modular runtime with C2, persistence, and fallback channels

This is especially important because the packages appeared legitimate from a publishing and provenance perspective.

Why this matters for administrators

The blast radius extends beyond developers using AsyncAPI directly. Because @asyncapi/specs is a transitive dependency, downstream tools and builds may have imported the compromised code without explicit awareness.

Potentially affected environments include:

  • Developer workstations
  • Build agents and CI/CD pipelines
  • Container image build systems
  • Production services that resolved the affected versions

Microsoft Defender Antivirus detects related artifacts as Trojan:JS/MiasmStealer.SC and Trojan:Script/Supychain.A.

Organizations should act immediately:

  • Remove all five affected package versions
  • Purge npm and Yarn caches
  • Hunt for sync.js in OS-specific NodeJS masquerade directories
  • Block outbound traffic to 85.137.53.71 on ports 8080, 8081, and 8091
  • Rotate credentials accessible from systems that imported the compromised packages
  • Review GitHub Actions workflows for unsafe pull_request_target usage and overprivileged tokens

Final takeaway

This incident highlights how trusted publishing and signed provenance do not guarantee safe source changes. Security teams should treat CI/CD workflow hardening, dependency monitoring, and credential rotation as immediate priorities after any exposure to the affected AsyncAPI packages.

Need help with Security?

Our experts can help you implement and optimize your Microsoft solutions.

Talk to an Expert

Stay updated on Microsoft technologies

AsyncAPInpmsupply chain attackGitHub Actionsmalware

Related Posts

Security

Microsoft Sentinel Named a 2026 SIEM Leader

Microsoft has been named a Leader in the 2026 Gartner Magic Quadrant for SIEM, highlighting the continued momentum behind Microsoft Sentinel. The announcement also underscores Microsoft's push toward integrated, AI-powered security operations through deep Sentinel integration with the new Integrated Security Operations Center in Microsoft Defender.

Security

Microsoft Perception GA: Agentic Security at Ignite

Microsoft has made Microsoft Perception generally available, introducing an agentic security platform that coordinates red, blue, and green team agents through automated playbooks. Announced at Ignite 2026, the update also expands Defender and Sentinel capabilities to help security teams detect, investigate, and remediate AI-speed threats while keeping administrators in control.

Security

Device Code Phishing Risks for AI Coding Agents

Microsoft warns that device code phishing can be used against AI coding agents such as GitHub Copilot CLI, not just user mailboxes or cloud apps. In a controlled lab, a single approved device code sign-in could enable remote session steering, memory poisoning, synced session exposure, and private repository access depending on account permissions and enabled features.

Security

Microsoft 365 Outage Phishing Campaign Targets Users

Microsoft Threat Intelligence reported a high-volume phishing campaign that impersonates Microsoft 365 service-health notifications to trick users into clicking malicious links. The campaign matters because it uses outage-themed urgency and recipient-specific tracking to target multiple industries, increasing the risk of credential theft and follow-on account compromise.

Security

SCKit ScreenConnect Attack: MSPs Must Hunt Now

Microsoft Threat Intelligence confirmed a campaign abusing ConnectWise ScreenConnect to deploy unauthorized remote-access clients and the SCKit worm on MSP-managed endpoints. The activity can also target technician sessions, making this a high-priority incident for defenders because removing a rogue client alone does not eliminate persistence or invalidate exposed sessions.

Security

AI Agent Supply Chain Attacks Target Coding Tools

Microsoft Security researchers detailed two post-training supply chain attack paths that can backdoor coding and terminal agents: dataset poisoning and model poisoning. The findings matter because compromised agents can misuse tools, execute commands, and access sensitive environments even when prompts appear benign, reinforcing the need for stronger controls around training data, model provenance, and tool permissions.