{"id":"MAL-2026-20424","summary":"Malicious code in x3r0day-bunnyhijack-poc (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (0d293a3791efc54b2b723fdd84d295e56e523532a5591bb48fde37fc555083b6)\nPackage declares no lifecycle scripts but ships `bin.grunt -\u003e./shim.js` and depends on `@sap/hana-theme-vscode`, whose own postinstall invokes `grunt`. Under `bun install`, bun resolves the `grunt` bin to this package's shim and executes it as part of the trusted dependency's postinstall. The shim writes a marker file `pwned-by-bunnyhijack.txt` to INIT_CWD / cwd / tmpdir and spawns the OS default browser (`xdg-open` / `open` / `cmd /c start`) to a hardcoded GitHub URL. The package's `package.json` description and README openly identify it as a proof-of-concept whose purpose is to execute attacker-controlled code during install via bin-shim hijack of a transitive dependency's PATH lookup. The current payload is benign (file drop + browser launch), but the mechanism is a general install-time code execution primitive that fires on a default `bun install` with no consent prompt and no declared lifecycle hook on this package.\n","modified":"2026-11-24T06:30:06.836048941Z","published":"2026-11-24T05:39:22Z","database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-023079","import_time":"2026-11-24T06:19:37.276272784Z","modified_time":"2026-11-24T05:39:22Z","sha256":"0d293a3791efc54b2b723fdd84d295e56e523532a5591bb48fde37fc555083b6","source":"amazon-inspector","versions":["1.0.3"]}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/x3r0day-bunnyhijack-poc/v/1.0.3"}],"affected":[{"package":{"name":"x3r0day-bunnyhijack-poc","ecosystem":"npm","purl":"pkg:npm/x3r0day-bunnyhijack-poc"},"versions":["1.0.3"],"database_specific":{"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/x3r0day-bunnyhijack-poc/MAL-2026-20424.json","indicators":{"evidence_files":[{"tlsh":"5e4133aad5fe317813b23515591f8a25baefd8510548eaf4a0acc3812fd0674433ad7e","path":"shim.js","sha256":"dd116e5190bda05c3f69fce55f27c3c1f913ef47f863729931d144587ef0abff"},{"path":"package.json","sha256":"5e3628574e91ae39995590bb0b7c9e161c39c0f14ab60275059ceef89f33a3f2","tlsh":"e2f02710c3304cb204c9afa26e29e61266250b470832be0c37af508c5b4eb2b58fa27d"}],"package_integrity":[{"filename":"x3r0day-bunnyhijack-poc-1.0.3.tgz","hashes":{"sha1":"1e9c6e89849a1f4fbb7c2dd9abd6da1de2b47bf3","sha512_sri":"sha512-MjGD6Pkfor35q2mM17a+aa80UNtmP2TO6XLKdbg27853rWg+lXdHLFEfaP9XSdyciHKrA+gT50bVQ7l3489t7A=="}}]}}}],"schema_version":"1.9.2","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}