OSV ID
MAL-2026-11524
Ecosystem
npm
Summary
keyv@6.0.0 is a lookalike of the popular keyv key-value package but ships an attack chain absent from the real library. The package.json preinstall hook runs a heavily obfuscated setup.mjs whose strings (URLs, shell commands, platform tokens, payload filename) are all reconstructed at runtime via a rotated string-array plus RC4-style decoder. On install, setup.mjs reassembles a GitHub-releases URL for a platform-specific Bun runtime archive (bun-linux-*, bun-darwin-*, bun-windows-*), downloads it, extracts it via PowerShell Expand-Archive or unzip, chmod+x's the resulting binary, and then uses execFileSync to invoke the shipped Math_Symbol.js under that dropped Bun runtime. Math_Symbol.js is a ~727 KB Bun-compiled bundle (// @bun @bun-cjs prelude) with obfuscated identifiers and a large constant table; it is not referenced by dist/index.mjs and only ever runs under the alien Bun runtime dropped at install. The library's advertised key-value storage has no need for a second language runtime or a hidden compiled bundle. Installing this package causes attacker-controlled code to execute on the installer's machine automatically via the npm preinstall lifecycle, using an alien-runtime dispatch that evades scanners inspecting only Node-resolved code.
Source: amazon-inspector (4b828a8383aadd40e3c94c5be32dc4466e0d7c4872550f6316da2a195e978ca5)
Protect your entire dependency tree
Scan your lock files automatically on every PR. Block malicious packages before they reach production.