Skip to main content
MalwarePublished

js-tokens-array (npm) · Malicious Code

Affects js-tokens-arraySource GCVE Database

0

Malicious package : remove js-tokens-array and rotate any secrets on hosts that installed it.

Data as of 9 Sep 2026, 21:38 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-15556

What to do

Remove js-tokens-array 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

ProductAffectedFixed in
npmjs-tokens-arrayAffected
  • =1.0.0
  • =1.1.1
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 'js-tokens-array' contains malicious code that executes arbitrary JavaScript during module load. It reconstructs a URL from a numeric char-code array to fetch JSON data from a remote host, then passes the 'token' field from this JSON to eval(), enabling remote code execution in the installer's Node.js process. The package name is a typosquat of the legitimate 'js-tokens' library, designed to lure users into installing it.

References

Community reviews

Loading reviews…