Malicious code in commonjs-assert (npm)
Historical advisory saved 24 Oct 2026 13:17:17 UTC. The publisher may have updated it since then. Latest advisory.
osv · MAL-2026-10676
Published--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (b7fa2454998144bffed3fc1e2d73046b8414179b59fb99d3339f2658e00637f7) The package name resembles Node.js's built-in `assert` module. On require(), `index.js` spawns a detached `node` child process against `lib/chai/utils/assertion.js`. That file is a single-line obfuscator.io-style bundle (rotated string array, custom-base64 decoder, hex-indexed accessors) whose runtime behavior is to require `http`/`https`, perform an HTTP GET against a URL reconstructed from the encoded string array, and pass the response body to `new Function(..., body)(require)` — remote content fetched at import time and executed with Node's `require` available. The obfuscation hides the destination URL from static inspection and shields the network-to-eval sink. Any project that requires or imports this package silently triggers arbitrary remote code execution on the installer's host. ## Source: ghsa-malware (02b1b90b34ceaca511acb3b1b2e4e16be4b3571613904788dcc379e7c40f9b6d) 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.
- Source published
- 15 Jul 2026 10:42:17 UTC
- Source modified
- 11 Aug 2026 12:30:12 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.