truffle-kitnpm
Advisory published Updated
truffle-kit is a confirmed malicious npm package (MAL-2026-20293) that typosquats a legitimate package to trick installs (malicious version 3.3.2). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in truffle-kit (npm)
What this malware does
Package presents itself as a pino-style logging middleware (keywords 'fast, logger, stream, json', exports as pino), but the advertised middleware is a dropper. The main entry index.js exports a middleware factory that spawns a detached node lib/caller.js child with stdio: 'ignore' and child.unref(), hiding the child from the parent. lib/caller.js base64-decodes a hardcoded URL (https://iphub-encrypted.vercel.app/api/auth/f1f097d93c318c92f0c5), POSTs to it with axios, and passes the response body to new Function.constructor('require', s) then invokes it with the real require, granting the remote endpoint arbitrary code execution with full Node privileges on the installer's host. Package metadata (bugs URL at jsonspack.com, description text unrelated to logging) is inconsistent with the advertised pino-logger purpose, consistent with impersonation/typosquat cover for the dropper.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
TyposquatFind it
Search your lockfiles and build artifacts for truffle-kit (version 3.3.2).
If you installed it — respond
truffle-kit is a typosquat — you almost certainly intended a legitimately-named package. Remove truffle-kit, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.
Did it already run?
If truffle-kit was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks truffle-kit-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.