AsyncAPI Supply Chain Attack Targets Developer Credentials

A recent supply chain attack has compromised the AsyncAPI project on the npm registry, posing significant risks to developers and automated build systems. On July 14, 2026, attackers republished five versions of the AsyncAPI package within a span of ninety minutes, each containing a concealed loader that activates upon code import.

Unlike traditional malware that relies on install scripts—often blocked by security measures—this malicious code executes when an application or build tool loads the infected module. Consequently, standard safety settings like ‘ignore-scripts’ offer no protection against this threat.

Microsoft analysts traced the breach to a vulnerable GitHub Actions workflow, which allowed unauthorized code execution. The attack’s second stage introduces a modular runtime named Miasma, capable of communicating with remote servers, maintaining persistence, and deploying modules designed to steal credentials.

Given that the compromised @asyncapi/specs package is a dependency for numerous AsyncAPI tools, the attack’s reach extends to developer workstations, continuous integration pipelines, containers, and even some production environments. Systems that resolved the malicious versions during the exposure window may have executed the payload without any visible signs.

Credential Theft Capabilities

The Miasma runtime is engineered to access a wide array of credentials commonly found in development and CI environments. It scans for over a hundred environment variables associated with source control platforms, package registries, major cloud providers, container platforms, secret managers, and AI services.

Specifically, it targets variables such as GITHUB_TOKEN and GITLAB_TOKEN for code repositories, NPM_TOKEN and NODE_AUTH_TOKEN for package management, and keys for AWS, Azure, and Google Cloud services. Additionally, it seeks API keys for AI platforms like Anthropic and OpenAI, as well as Docker and Kubernetes tokens often stored in environment settings.

On the filesystem, Miasma searches for sensitive files including .npmrc, AWS credentials, kubeconfig, SSH private keys, Vault tokens, .netrc, Docker configuration files, and Google service account JSON files. If a GitHub token is discovered, the malware can enumerate accessible repositories and CI contexts via public APIs, mirroring tactics seen in previous credential theft campaigns targeting the npm ecosystem.

Although the credential-stealing modules were inactive in the analyzed sample, the complete code was present within the encrypted bundle. With persistence mechanisms and command channels already operational, attackers could remotely activate these modules without issuing a new package release, a strategy observed in prior malware campaigns against developer tools.

Exploitation of Import-Time Execution

The attack commenced with a malicious pull request to the asyncapi/generator repository. A misconfigured GitHub Actions workflow, utilizing the ‘pull_request_target’ trigger, executed untrusted code and exposed a privileged bot token. This vulnerability enabled attackers to push malicious commits and leverage the project’s trusted release pipeline to publish the compromised packages under a valid npm identity.

This method aligns with previous incidents where GitHub Actions workflows were exploited to distribute malware through automated pipelines. The legitimate release workflows published versions 3.3.1 of @asyncapi/generator, 0.7.1 of generator-components, 1.1.1 of generator-helpers, and two versions of @asyncapi/specs, all bearing valid provenance from unauthorized source commits.

Upon importing any of these packages, the loader initiates a hidden Node.js process that fetches an encrypted secondary payload, further embedding the attack within the system.

Microsoft advises developers to remove the affected package versions, clear npm and Yarn caches, and rotate all credentials accessible from any host that imported the compromised packages. Additionally, defenders should search for a file named ‘sync.js’ located in directories mimicking Node.js support folders across Windows, macOS, and Linux systems.

This incident underscores the critical need for robust security practices in software supply chains. Developers and organizations must scrutinize automated workflows, implement stringent access controls, and regularly audit dependencies to mitigate the risk of similar attacks. As supply chain compromises become more sophisticated, proactive measures are essential to safeguard sensitive credentials and maintain the integrity of development environments.