Four compromised npm packages in the @asyncapi namespace were found distributing a sophisticated multi-stage botnet loader that executes malicious code immediately upon being imported into a project.
Key Points
- Affected packages include @asyncapi/generator-helpers, @asyncapi/generator-components, @asyncapi/generator, and @asyncapi/specs.
- The malware, identified as a variant of the Miasma framework, downloads an encrypted payload from IPFS when the module is loaded by Node.js.
- Attackers exploited a misconfigured GitHub Actions workflow to gain repository access and publish packages with legitimate SLSA provenance attestations.
- The malicious code features a dead man's switch and evasion techniques to avoid detection by security tools and sandbox environments.
- All five malicious package versions have been removed from the npm registry, though impacted systems should be treated as potentially compromised.