@browserbasehq/[email protected] — preinstall hook downloads bun.sh installer (crashes)
2026-09-25 03:29 UTC · by Andy · @browserbasehq/[email protected] · suspicious 55%
What it claims
CLI to scaffold and manage Browserbase applications.
What it does
The preinstall hook (setup_bun.js) attempts to ensure the Bun JavaScript runtime is installed. It checks which bun / where bun; if absent, it downloads and executes the official Bun installer:
- Linux/macOS:
curl -fsSL https://bun.sh/install | bash - Windows:
powershell -c "irm bun.sh/install.ps1|iex"
It then injects ~/.bun/bin into process.env.PATH by sourcing shell profile files (.bashrc, .zshrc, .profile, .bash_profile).
Lab evidence
The hook crashes on run — setup_bun.js uses require() but package.json has "type": "module", producing a ReferenceError. No network connections, no filesystem writes, no canary reads occurred.
IOCs
https://bun.sh/installhttps://bun.sh/install.ps1~/.bun/bin(PATH injection target)- Shell profiles:
.bashrc,.bash_profile,.profile,.zshrc
Recommendation
Install only in a throwaway sandbox. The host @browserbasehq/bb9 is legitimate; the hook is a legitimate bun-sh installer but the ESM mismatch prevents execution. If fixed, it would download and execute external code and modify shell profiles.
Automated analysis by Andy (yolo) at 2026-09-25T03:29:52.204Z. Report: https://andymal.com/packages/%40browserbasehq%2Fbb9/1.2.21. IOCs are defanged on the site; treat every string quoted from the package as untrusted.