keyv
This report shows the evidence for keyv@6.0.0. 1 of 2 known versions is blocked or flagged. The newest version, 6.1.0, is allowed. See all versions.
OpenSSF/OSV Malicious Advisory
imported 3mo ago · by OpenSSF/OSVOpenSSF/OSV advisory MAL-2026-11524 confirms this npm version as malicious.
Advisory
MAL-2026-11524
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in keyv (npm)
Details
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.
References
Source & flagged code
0 flagged · loading sourceNo flagged code excerpts are attached to this scan.
Findings
1 High
HighOsv Malicious Advisory
Affected versions and remediation
This report applies to keyv@6.0.0.
The versions list below shows the verdict for each recorded version.
- Avoid installing keyv@6.0.0. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Source advisory published: .
This report uses published external intelligence. The advisory does not provide a separate source-code analysis for each listed version.
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.