Malicious code in js-tokens-array (npm)
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.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'js-tokens-array' npm package (versions 1.0.0 and 1.1.1) runs code at module load time that reconstructs a URL from an obfuscated numeric char-code array. This URL points to https://access-token-delta.vercel.app/, from which JSON data is fetched. The 'token' field of this JSON is then passed to eval(), causing arbitrary JavaScript code from the remote host to execute in the context of the Node.js process that imports or requires this package. This behavior constitutes a malicious package designed for remote code execution. The package name mimics the popular 'js-tokens' library, indicating a typosquatting attack vector.
Potential Impact
Any user or system that installs or imports 'js-tokens-array' versions 1.0.0 or 1.1.1 will execute arbitrary JavaScript code delivered by a remote attacker, leading to remote code execution within the Node.js environment. This can compromise the security and integrity of the host system and any data accessible to the Node.js process.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should avoid installing or using the 'js-tokens-array' package, especially versions 1.0.0 and 1.1.1. Verify package names carefully to avoid typosquatting attacks and prefer the legitimate 'js-tokens' library. Monitor package sources and remove any instances of this malicious package from projects and dependency trees. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for current remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-15556
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a92f7d9acd9273b49e75a7a
Added to database: 08/29/2026, 15:16:41 UTC
Last enriched: 09/09/2026, 21:38:09 UTC
Last updated: 10/01/2026, 22:26:57 UTC
Views: 30
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.