MAL-2026-20293: Malicious code in truffle-kit (npm)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (e31407446b3d2956a7510904bdc4e247d1ddb3d743e85fbfff5cc634547964ea) 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.
Affected Software
Frequently Asked Questions
What must happen for the malicious code to run?
The package's main entry exports a middleware factory that spawns the malicious child process. Code execution occurs when that middleware factory is invoked by an application, not merely from the package metadata being present.
What access does the attacker gain if the remote payload is delivered?
The child process downloads code from a hardcoded remote URL and executes it using the host's real Node.js require function. This gives the remote endpoint arbitrary code execution with the full Node privileges of the process running the application.
How can I check whether an application has activated the dropper?
Look for use of the package's exported pino-style middleware and for detached Node processes running "node lib/caller.js" with ignored standard I/O. The child contacts the hardcoded iphub-encrypted.vercel.app API endpoint using an HTTP POST request.
What can I do if I cannot immediately remove the package?
Prevent the exported middleware factory from being invoked and block outbound access to the hardcoded remote endpoint. Because the payload is remotely supplied, treat any host where the middleware ran as potentially compromised and investigate it accordingly.