OpenSSF/OSV advisory MAL-2026-12358 confirms this npm version as malicious. package.json declares scripts.postinstall = 'node dist/config.js'. On npm install, dist/config.js performs an outbound fetch to https://my-api.trade-api.workers.dev?id=1 and executes globalThis[data.success](data.id) using the function name and argument returned by that endpoint. The script also assigns createRequire onto globalThis prior to the dispatch, broadening the set of callable capabilities...
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in croft-node (npm)
Details
package.json declares scripts.postinstall = 'node dist/config.js'. On npm install, dist/config.js performs an outbound fetch to https://my-api.trade-api.workers.dev?id=1 and executes globalThis[data.success](data.id) using the function name and argument returned by that endpoint. The script also assigns createRequire onto globalThis prior to the dispatch, broadening the set of callable capabilities. The advertised purpose of the package is an in-memory keyed cache with TTL/LRU, which has no need for install-time network I/O; the postinstall behavior is unrelated to the documented library API. The result is remote-controlled code execution on the installer's host at install time, driven by an attacker-controlled Cloudflare Workers endpoint.
Decision reason
OpenSSF Malicious Packages via OSV confirms croft-node@1.1.2 as malicious (MAL-2026-12358): Malicious code in croft-node (npm)