commonjs-assertion @1.2.7
Vulnerability report · Last retrieved from osv.dev August 11, 2026 at 2:21 PM UTC
OSV ID
MAL-2026-13719
Ecosystem
npm
Summary
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.
Source: amazon-inspector (29c3fd028dc7e2493e59a3f81bb26702030dac0a64a42d845bd23ea116352f94)
Protect your entire dependency tree
Scan your lock files automatically on every PR. Block malicious packages before they reach production.