NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
Malicious package

commonjs-assertionnpm

Advisory published Updated

commonjs-assertion is a confirmed malicious npm package (MAL-2026-13719) that executes malicious code on install (malicious version 1.2.7). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in commonjs-assertion (npm)

MAL-2026-13719
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall commonjs-assertion

What this malware does

Package presents itself as a chai-like assertion library. index.js uses hex-encoded strings to hide the identifiers 'child_process' and 'node' and, on require, unconditionally invokes child_process.spawn to launch a detached, stdio-ignored node child running lib/chai/utils/assertion.js. That file is a heavily obfuscated loader (obfuscator.io rotated string array plus a custom base64/URI decoder) whose decoded logic performs an HTTP GET to a URL reconstructed from the encoded string array and passes the response body to new Function(..., body)(require), granting the fetched remote code full Node access. The assertion.js file is not referenced by chai's real code and is only reachable via the hex-hidden spawn in index.js. Importing the package causes remote code execution on the installer's host at load time.

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

1 flagged
1.2.7

Indicators of compromise (SHA-256)

0d9cb8e89c50d78130775904af2df0dc68d2fa17454fcd0c042e273c51e40855
29c3fd028dc7e2493e59a3f81bb26702030dac0a64a42d845bd23ea116352f94

Detection & response playbook

Malicious package
  1. Find it

    Search your lockfiles and build artifacts for commonjs-assertion (version 1.2.7).

  2. If you installed it — respond

    Remove commonjs-assertion from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.

  3. Did it already run?

    If commonjs-assertion 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

No. commonjs-assertion on npm has been identified as a malicious package (version 1.2.7 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

GHSA-mfjj-4625-mpvrIN-MAL-2026-017282

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks commonjs-assertion-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.

Explore

commonjs-assertion (npm) malicious package — MAL-2026-13719 | O3 Security