tfjs-inference (npm) · Malicious Code
Affects tfjs-inferenceSource GCVE Database
Malicious package : remove tfjs-inference and rotate any secrets on hosts that installed it.
Data as of 19 Aug 2026, 14:45 UTC
Malicious package
Published to npm · OSV MAL-2026-14192
What to do
Remove tfjs-inference 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-inference | 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 npm package 'tfjs-inference' version 1.0.0 is a typosquatting package targeting TensorFlow.js. It contains a postinstall script that automatically collects host identifiers such as hostname, platform, architecture, Node.js version, and package name, then sends this data as JSON to a hardcoded third-party server without user consent or notification. The package internally labels itself as a security research canary, but the data exfiltration destination is controlled by the author, raising significant privacy and security concerns.