AsyncAPI Supply-Chain Attack Uses GitHub Actions Misconfiguration to Steal Credentials and Publish Malicious npm Packages

· Original article ↗

Summary

An attacker abused a vulnerable GitHub Actions workflow to steal an AsyncAPI service-account token and publish malicious npm packages. The packages deliver multi-stage malware capable of persistence, remote commands, and credential theft.

Key points

  • The attacker used a pull_request_target workflow that checked out untrusted pull-request code, exposing repository secrets to attacker-controlled code.
  • A stolen AsyncAPI bot token was used to push malicious commits and publish five compromised versions across four @asyncapi npm packages.
  • The packages execute the payload on import or require; it downloads a second stage from IPFS and installs a persistent malware framework.
  • The malware can steal browser credentials, SSH keys, npm and GitHub tokens, cloud credentials, macOS Keychain data, and cryptocurrency wallets.
  • The malware communicates with command-and-control infrastructure over HTTP, Nostr relays, Ethereum smart contracts, and a libp2p mesh network; attribution remains unconfirmed.
  • Organizations are advised to check developer workstations, CI/CD systems, repositories, and affected package versions, and rotate potentially exposed credentials and secrets.
  • The article recommends dependency allowlisting, SBOM generation, package verification, and improved monitoring of developer and build environments.

Article Details

Attack Vectors
  • A GitHub Actions workflow used pull_request_target but checked out and executed code from an untrusted pull request, exposing repository secrets to attacker-controlled code.
  • The attacker used the stolen Personal Access Token to push malicious commits to AsyncAPI repositories and trigger npm releases of compromised packages.
  • The packages execute their payload when imported or required. The first stage downloads a second stage from IPFS, which launches a malware framework with credential theft, persistence, remote-command, and data-exfiltration capabilities.
Defensive Notes
  • Investigate developer workstations, CI/CD environments, and repositories for signs of compromise, and audit systems for the affected package versions.
  • Assume GitHub tokens, SSH keys, cloud credentials, and CI/CD secrets may have been exposed; rotate them accordingly.
  • Strengthen software supply-chain defenses with dependency allowlisting, SBOM generation, package verification, and improved monitoring of developer and build environments.
  • Separate workflows that require secrets from jobs that execute untrusted pull-request code.

Indicators of compromise

TypeIndicatorContext
DOMAINipfs[.]ioIdentified as payload-delivery infrastructure.
DOMAINrentry[.]coPastebin domain used for the token-exfiltration dead-drop URL.
IPV485[.]137[.]53[.]71Command-and-control server.
SHA122bf76fe317ea6769bd38619bd440e42d119bd6bHash of the malicious validator.js file in @asyncapi/generator.
SHA19890950adcbc2478e7a080234f053214adbad44eHash of the malicious ErrorHandling.js file in @asyncapi/generator-components.
SHA1a7e18d96efd3cdb127ef4cdcad9e3ad26c482bf2Hash of the malicious utils.js file in @asyncapi/generator-helpers.
SHA1c70e105e212ff3c1daa04bb2a62507717f296b0bHash of the malicious index.js file in @asyncapi/specs.
SHA1c8cb3f6d5b90c46686d2bf531dc1a5786e27edc5Hash of the Stage 2 sync.js payload.

MITRE ATT&CK

Malware

Products

Tools

Industries

Related Articles