npm · Malicious package advisory
Malwarejs-tokens-array
GHSA-8crw-r25r-mwv4
Malicious code in js-tokens-array (npm)
Details
**Severity:** Critical **Affected versions:** `= 1.0.0` ## Source: amazon-inspector (3f8ed5536e88f2c77c432b868367e25dea9244052779e825999e6e4324dcc35b) index.js runs getToken() at module load time. The destination URL is reconstructed from a numeric char-code array via String.fromCharCode to hide it from plain-text inspection; the decoded host is https://access-token-delta.vercel.app/. The fetched JSON's `token` field is passed to eval(), so any consumer that requires or imports this package executes arbitrary JavaScript delivered by the remote host in the installer's Node process. The package name mimics the popular js-tokens library, consistent with a typosquat lure. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/e4956292c0cf024519ebae88e8b315a0af37a829/osv/malicious/npm/js-tokens-array/MAL-2026-15556.json)) **References:** - https://github.com/ossf/malicious-packages/blob/e4956292c0cf024519ebae88e8b315a0af37a829/osv/malicious/npm/js-tokens-array/MAL-2026-15556.json - https://www.npmjs.com/package/js-tokens-array/v/1.0.0 - https://www.npmjs.com/package/js-tokens-array/v/1.1.1 - https://github.com/advisories/GHSA-8crw-r25r-mwv4
Compromised versions (1)
- = 1.0.0
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.