​ ​AsyncAPI npm packages infected with credential-stealing malware

A Supply-Chain Attack Unfolds: AsyncAPI Packages Compromised with Credential-Stealing Malware

In a brazen supply-chain attack, five malicious versions of AsyncAPI packages were published to the Node Package Manager (npm) in just four hours and seven minutes. The compromised packages, part of the @asyncapi namespace, had a staggering cumulative weekly download count of over 2.25 million. This heist is a stark reminder that even well-known and widely used projects can be vulnerable to such attacks.

The threat actor exploited a misconfigured GitHub Actions workflow, pushing trojanized packages into the project files of two AsyncAPI repositories. The malicious code was designed to deliver a remote access trojan (RAT) with info-stealing capabilities. When an infected package is imported, it triggers a downloader that retrieves a second-stage script from the IPFS peer-to-peer content delivery network. This script ultimately launches a hidden process on the system.

According to researchers at Step Security, the attacker compromised both repositories’ CI/CD pipelines by pushing commits under a placeholder Git identity. The resulting packages had legitimate SLSA provenance attestations, indicating they originated from an authorized workflow. The five malicious AsyncAPI packages were:

* @asyncapi/generator 3.3.1 (101k weekly downloads)

* @asyncapi/generator-helpers 1.1.1 (43k weekly downloads)

* @asyncapi/generator-components 0.7.1 (34k weekly downloads)

* @asyncapi/specs 6.11.2-alpha.1 and 6.11.2 (2.1 million weekly downloads)

The second-stage payload is a modular malware framework with persistence capabilities, establishing connections to the command-and-control (C2) server over multiple channels: HTTP, Nostr relays, Ethereum smart contracts, and a libp2p mesh network. Although the final payload bears similarities to past supply-chain attacks like Miasma, researchers believe it may be a private or parallel build by the same operators.

The malware’s primary purpose is to steal sensitive information, including credentials, authentication keys, tokens, browser data, CI/CD system secrets, AI developer tools, cryptocurrency wallets, and databases. Additionally, it allows for the download of Gitleaks and HackBrowserData tools to aid in data collection. However, a recent report from Aikido notes that these functions do not work as intended, although manual execution is still possible.

The exposure window for this attack was brief but significant. As of writing, all five malicious packages have been removed from npm; however, developers are advised to take immediate action: pin to known-good files, regenerate lock files, remove the hidden ‘NodeJS/sync.js’ payload, terminate any malicious processes, and rotate credentials on impacted systems.

This attack serves as a stark reminder that even well-known projects can be vulnerable to supply-chain attacks. It is crucial for developers to remain vigilant and proactive in their security measures.


Source: Bleeping Computer — 2026-07-15