Open Source ·

AsyncAPI npm releases carried a Miasma botnet loader

An attacker exploited a pull_request_target workflow in the AsyncAPI generator repository to steal an npm publish token, then shipped four @asyncapi packages that fetched an encrypted Miasma second stage from IPFS on module import.

Part of Miasma worm burrowed through npm for two months campaign

Four npm packages in the @asyncapi namespace shipped a multi-stage botnet loader on July 14, 2026, after an attacker stole the project's publishing token by way of a misconfigured GitHub Actions workflow. Together the affected packages account for roughly 2.9 million downloads a week.

AsyncAPI is an open specification and toolchain for describing event-driven APIs, and its generator turns those specifications into code and documentation. Socket, which analyzed the releases, said the malicious versions were @asyncapi/generator-helpers@1.1.1, @asyncapi/generator-components@0.7.1, @asyncapi/generator@3.3.1, and @asyncapi/specs at 6.11.2 and 6.11.2-alpha.1, all published within minutes of each other.

The entry point was a pull_request_target workflow in the generator repository. That trigger runs with the base repository's secrets available, including automation tokens, while checking out code a contributor controls. Aikido described the result as npm packages backdoored through the project's own release automation, which is why the poisoned versions arrived looking like ordinary releases.

The loader did not use an install hook. Socket said the injected code ran when Node.js imported the module, then spawned a detached node -e process that pulled an 8.25 MB encrypted payload from IPFS and stored it in directories named to resemble Node.js runtime paths. Decrypted, that payload was Miasma: a modular cross-platform tasking framework with REST-based command and control, file listing and transfer, shell execution, payload update, and persistence through systemd user services. Because execution happened on import rather than on install, npm install --ignore-scripts offered no protection. Investigators were told to treat any machine that imported the packages as compromised and to watch for detached Node processes and IPFS gateway traffic.

Notes

  • Initial access was a pull_request_target GitHub Actions workflow in the AsyncAPI generator repository, which exposes base-repository secrets to a workflow that checks out contributor-controlled code. The stolen npm automation token was then used to publish directly.
  • Execution occurs on module import rather than through an install hook, so npm install --ignore-scripts does not prevent it. The first stage launches a detached node -e process that retrieves the encrypted second stage from IPFS.
  • Socket reported the second stage as an 8.25 MB encrypted payload. Combined weekly downloads across the four affected packages were reported at approximately 2.9 million.
  • Unit 42 described the command-and-control design as decentralized fallback infrastructure spanning IPFS, Ethereum, and Nostr relays, so blocking any single retrieval channel does not sever the second-stage fetch.

Appendix · Affected releases

1.1.1 sha256 93242c04…ed974d44 download unavailable
  • OSSF MAL-2025-190657 maps the SHA-1 and SHA-512 checksums to the complete generator-helpers-1.1.1.tgz npm archive.
0.7.1 sha256 ae162b82…4a35b620 download unavailable
  • OSSF MAL-2025-190656 maps the SHA-1 and SHA-512 checksums to the complete generator-components-0.7.1.tgz npm archive.
3.3.1 sha256 64c2ba68…2b8e7416 download unavailable
  • OSSF MAL-2025-190636 maps the SHA-1 and SHA-512 checksums to the complete generator-3.3.1.tgz npm archive.
6.11.2 no sample yet
6.11.2-alpha.1 no sample yet
  • The two SHA-256 values are Socket's whole-tarball checksums for 6.11.2 and 6.11.2-alpha.1, respectively. The generator-family artifacts likewise use Socket's published whole-tarball SHA-256 values.
  • OSSF MAL-2025-190643 maps the SHA-1 and SHA-512 checksums specifically to the complete specs-6.11.2.tgz npm archive.

Indicators

  • malware_familyMiasma
  • ipv485.137.53.71
  • port8080
  • port8081
  • port8091
  • file.miasma lock directory

References

  1. Compromised npm Packages in the AsyncAPI Namespace Deliver Miasma Botnet Loader - Socketsocket.dev
  2. AsyncAPI npm packages backdoored via GitHub Actions - Aikidoaikido.dev
  3. Compromised AsyncAPI npm Packages Deliver Multi-Stage Botnet Malware - The Hacker Newsthehackernews.com
  4. Four AsyncAPI npm packages carry Miasma botnet loader - Developer Techdeveloper-tech.com
  5. Miasma Worm Returns to npm - JFrog Security Researchresearch.jfrog.com
  6. The npm Threat Landscape: Attack Surface and Mitigations - Unit 42unit42.paloaltonetworks.com
  7. OSSF MAL-2025-190657 package-integrity record for @asyncapi/generator-helpersraw.githubusercontent.com
  8. OSSF MAL-2025-190656 package-integrity record for @asyncapi/generator-componentsraw.githubusercontent.com
  9. OSSF MAL-2025-190636 package-integrity record for @asyncapi/generatorraw.githubusercontent.com
  10. OSSF MAL-2025-190643 package-integrity record for @asyncapi/specsraw.githubusercontent.com

Source record: oss/attacks/asyncapi/meta.yaml