tfjs-custom-module (npm) · Malicious Code
Affects tfjs-custom-moduleSource GCVE Database
Malicious package : remove tfjs-custom-module and rotate any secrets on hosts that installed it.
Data as of 19 Aug 2026, 14:42 UTC
Malicious package
Published to npm · OSV MAL-2026-14196
What to do
Remove tfjs-custom-module from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmtfjs-custom-module | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The tfjs-custom-module npm package is a typosquatting malicious package impersonating the tensorflow/tfjs package. It contains a postinstall script that automatically runs on installation and collects host system identifiers such as hostname, platform, architecture, Node.js version, package name, and npm lifecycle event. This data is exfiltrated via an HTTPS POST request to a hardcoded external domain controlled by the attacker. This behavior constitutes unauthorized host reconnaissance and data exfiltration without user consent.