BunnyHijack: x3r0day-bunnyhijack-poc npm package — install-time code execution via grunt bin shim hijack
Severity: critical · Patch status: no-fix-needed · Since 2026-11-24
On 2026-11-24, the GitHub Advisory Database published GHSA-qj6w-5gxp-6mx2 for malicious npm package x3r0day-bunnyhijack-poc 1.0.3. The package declares no lifecycle scripts but ships bin.grunt pointing to ./shim.js and depends on @sap/hana-theme-vscode, whose postinstall invokes grunt. Under bun install, bun resolves grunt to the malicious shim and executes it during the trusted dependency's postinstall. The shim writes pwned-by-bunnyhijack.txt to INITCWD, cwd, or tmpdir and launches the OS default browser to a hardcoded GitHub URL. Its README describes it as a proof-of-concept for install-time code execution via bin-shim hijack of a transitive dependency's PATH lookup. The current payload is benign, but the mechanism is a general code-execution primitive that fires without consent. The advisory lists 144 downloads/month and no patched versions.
What to do
- Immediately remove or block x3r0day-bunnyhijack-poc@1.0.3 from dependency trees, lockfiles, caches, and CI images; do not install it.
- If it was installed with bun, check for pwned-by-bunnyhijack.txt in INIT_CWD, working directories, and temp dirs and treat the environment as potentially compromised.
- Rotate credentials and tokens accessible to affected install/CI environments if the package executed; review browser-launch and outbound network telemetry.
- Audit transitive dependencies and bin/PATH resolution for packages whose postinstall invokes tools like grunt; pin trusted versions and use lockfiles.
- Where feasible, disable lifecycle scripts or use install policies that block untrusted packages; monitor advisories for malicious npm packages.
Sources
All live incidents on Threat Watch