assertion-utils-jsnpm
Advisory published Updated
assertion-utils-js is a confirmed malicious npm package (MAL-2026-10612) that typosquats a legitimate package to trick installs (malicious version 2.4.3). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in assertion-utils-js (npm)
What this malware does
assertion-utils-js is a typosquat of chai (name, description, and keywords mirror the real package). On require(), index.js spawns a detached Node child process that runs lib/chai/utils/assertion.js in the background with stdio ignored. That file is heavily string-array obfuscated (obfuscator.io style: rotated _0x1b90 token array plus a custom base64+URI _0x2dd2 decoder with parseInt-checksum rotation, hex-named identifiers) and its runtime behavior is to reconstruct a URL from the decoded string array, call https.get to fetch a remote response body, then pass that body to new Function("require", body) and invoke the resulting function with require in scope. The obfuscation exists to hide the fetch destination from static inspection; the fetched code executes with full Node module privileges on every load of the package.
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
TyposquatFind it
Search your lockfiles and build artifacts for assertion-utils-js (version 2.4.3).
If you installed it — respond
assertion-utils-js is a typosquat — you almost certainly intended a legitimately-named package. Remove assertion-utils-js, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.
Did it already run?
If assertion-utils-js was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks assertion-utils-js-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.