MAL-2026-20293: Malicious code in truffle-kit (npm)

Published Nov 20, 2026
·
Updated

--- -= 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

1 affected component
npm/truffle-kit=3.3.2

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203